cron job do not work

ataglietti

New member
Joined
Nov 12, 2010
Messages
3
hello everybody,

I have a problem on my directadmin cron panel,
I have a php script that doesn't start with cron ... where can I see the logs from directadmin?

My PHP script runs if started by hand into a web browser...

here are the lines tested:


37 17 * * * /usr/local/bin/php -q /home/mysite/domains/mysite.com/public_html/import.php?mode=P
27 17 * * * /usr/bin/php -q /home/mysite/domains/mysite.com/public_html/import/import.php?mode=D
24 18 * * * /usr/bin/php -q /home/mysite/domains/mysite.com/public_html/import/import.php?mode=Z1
33 17 * * * /usr/local/bin/php /home/mysite/domains/mysite.com/public_html/import/import.php?mode=P
9 18 * * * /usr/local/php /home/mysite/domains/mysite.com/public_html/import/import.php?mode=Z1
21 18 * * * /usr/bin/curl -q /home/mysite.com/public_html/import/import.php?mode=Z1

my provider use a debian server.. is this a sintax error?

thanks for help and/or suggestions
:)
 
There are no cron logs in directadmin you would have to ask your hosting provider for help.

Typically you can pipe the output to your mailbox by doing:

| mail -s 'subject' [email protected]

so that it would look like:

37 17 * * * /usr/local/bin/php -q /home/mysite/domains/mysite.com/public_html/import.php?mode=P | mail -s 'subject' [email protected]

But your crons are all using different paths of php...verify your path of php is correct...on a directadmin system the path should be /usr/local/bin/php and not /usr/bin/php
 
cron

There are no cron logs in directadmin you would have to ask your hosting provider for help.

Typically you can pipe the output to your mailbox by doing:

| mail -s 'subject' [email protected]

so that it would look like:

37 17 * * * /usr/local/bin/php -q /home/mysite/domains/mysite.com/public_html/import.php?mode=P | mail -s 'subject' [email protected]

But your crons are all using different paths of php...verify your path of php is correct...on a directadmin system the path should be /usr/local/bin/php and not /usr/bin/php

Thanks for suggestion but the option | mail -s 'subject' [email protected] did not send out any mail....

I also test several php path behind the script path :
/usr/local/bin/php
/usr/bin/php
php

but it didn't works :(
 
Ask your provider to see if your cron is running. They will can see if it is checking: /var/log/cron
 
Back
Top