Problem with scheduler

Discuss and get help installing, using and configuring SiT!

Problem with scheduler

Postby raphael_morais » Thu May 03, 2012 5:09 pm

Hello,

I am Brazilian and I speak very little English, so I apologize if you do not understand some concordance, used Google to translate my doubts.

Implemented the SiT at my company and really like this tool, it fits perfectly my support area.

I have problem in just one point in the process, the problem is with task scheduler. The tasks are receiving status "Due Now" and are not running. I configured the "Cron Jobs" in my domain to run every minute as follows (/ usr / bin / php / home / solved / public_html / support / auto.php> / dev / null 2​​> & 1) I believe this is correct, it does not appear in the error logs.

I do not know much about PHP, but I believe the error is in the page code "auto.php" I would like to know what might be happening not to perform these tasks.

Attached are the print screen Scheduler "tasks.jpg" and file "auto.php" (renamed to auto.txt to avoid any blockage)

thank you
Raphael Morais
Attachments
auto.txt
auto.php
(43.38 KiB) Downloaded 21 times
tasks.jpg
tasks.jpg (154.43 KiB) Viewed 1171 times
raphael_morais
Lurker
Lurker
 
Posts: 4
Joined: Thu May 03, 2012 4:18 am
Location: São Paulo / Brasil

Re: Problem with scheduler

Postby Tomse » Sat May 05, 2012 6:38 am

hello and welcome.

the cron command looks wrong
it should look like this:

Code: Select all
/usr/bin/php /home/solved/public_html/support/auto.php > /dev/null 2​​> & 1


you have alot of spaces which I removed, and a missing space (auto.php>) -> (auto.php >)

if you run this line in the shell

Code: Select all
/usr/bin/php /home/solved/public_html/support/auto.php

your scheduler should run.

the
Code: Select all
> /dev/null 2​​> & 1

part, outputs all text to "trash" so you'll never see any error messages from the cronjob. This is good when it's running, but bad when it doesn't as you won't find any errors.

hope this helps.
Cheers
Tomse
Carsten Jensen, da-DK Translator Supporting Windows & Linux/FreeBSD installations, partial SiT developer / hacker / graphician
Live chat/support on IRC in channel #sit on freenode.net
User avatar
Tomse
SiT! Developer
SiT! Developer
 
Posts: 950
Joined: Fri Feb 20, 2009 10:51 am
Location: Somewhere near Copenhagen Denmark

Re: Problem with scheduler

Postby raphael_morais » Sat May 05, 2012 8:50 pm

Hello Tomse,

As I had used google to translate my doubts, I did not realize, but he ended up changing the line of code that was in my cron job.

The correct line was this:
Code: Select all
/usr/bin/php /home/solved/public_html/suporte/auto.php >/dev/null 2>&1


The modified leaving to receive the log in email:
Code: Select all
/usr/bin/php /home/solved/public_html/suporte/auto.php


What I get now is the email:
Code: Select all
X-Powered-By: PHP/5.2.17
Content-type: text/html; charset=UTF-8


The tasks in SiT continue with the status of Due Now.

That helped you with something?

Thank you
Raphael Morais
raphael_morais
Lurker
Lurker
 
Posts: 4
Joined: Thu May 03, 2012 4:18 am
Location: São Paulo / Brasil

Re: Problem with scheduler

Postby Tomse » Sun May 06, 2012 1:09 pm

try and run the command from shell and see what happens.
Code: Select all
/usr/bin/php /home/solved/public_html/suporte/auto.php



you do have the full line of
Code: Select all
* * * * * /usr/bin/php /home/solved/public_html/suporte/auto.php >/dev/null 2>&1

in your crontab ?


EDIT:
I forgot to mention that you'll see the Due now (yellow) lines just before the job runs. So if you see it when you get it up running, just wait a little bit.

cheers
Carsten Jensen, da-DK Translator Supporting Windows & Linux/FreeBSD installations, partial SiT developer / hacker / graphician
Live chat/support on IRC in channel #sit on freenode.net
User avatar
Tomse
SiT! Developer
SiT! Developer
 
Posts: 950
Joined: Fri Feb 20, 2009 10:51 am
Location: Somewhere near Copenhagen Denmark

Re: Problem with scheduler

Postby raphael_morais » Mon May 07, 2012 2:56 pm

The following result
Run:
Code: Select all
/usr/bin/php /home/solved/public_html/suporte/auto.php

Results:
Code: Select all
X-Powered-By: PHP/5.2.17
Content-type: text / html; charset = UTF-8


This line is exactly the cron

He helped with anything?
raphael_morais
Lurker
Lurker
 
Posts: 4
Joined: Thu May 03, 2012 4:18 am
Location: São Paulo / Brasil

Re: Problem with scheduler

Postby Tomse » Mon May 07, 2012 4:01 pm

it shouldn't give any output..

try
Code: Select all
/usr/bin/php  -f /home/solved/public_html/suporte/auto.php


which linux dist are you using ?

cheers
Tomse
Carsten Jensen, da-DK Translator Supporting Windows & Linux/FreeBSD installations, partial SiT developer / hacker / graphician
Live chat/support on IRC in channel #sit on freenode.net
User avatar
Tomse
SiT! Developer
SiT! Developer
 
Posts: 950
Joined: Fri Feb 20, 2009 10:51 am
Location: Somewhere near Copenhagen Denmark

Re: Problem with scheduler

Postby raphael_morais » Mon May 07, 2012 4:12 pm

The SiT is installed on my site at a company horpedagem not have full access to the machine, only the resources for routine administration of my domain, the dist is Linux Cent OS 5.

Run the command you sent now and gave no return, but the tasks remain the status Due Now
raphael_morais
Lurker
Lurker
 
Posts: 4
Joined: Thu May 03, 2012 4:18 am
Location: São Paulo / Brasil

Re: Problem with scheduler

Postby Tomse » Thu May 10, 2012 6:12 am

did the "last ran" time change after you ran the command ?

you can also manually run the scheduler by opening the file from a browser..

http://your-web-server/sit/auto.php
Carsten Jensen, da-DK Translator Supporting Windows & Linux/FreeBSD installations, partial SiT developer / hacker / graphician
Live chat/support on IRC in channel #sit on freenode.net
User avatar
Tomse
SiT! Developer
SiT! Developer
 
Posts: 950
Joined: Fri Feb 20, 2009 10:51 am
Location: Somewhere near Copenhagen Denmark


Return to Installing, Configuring and Using SiT!

Who is online

Users browsing this forum: No registered users and 0 guests

cron