Cron not running after server move
From Adult Web Scripts Wiki
Question
Got one site on a new server, I did a new install + import database without problems.
One thing, only automatic cronjobs don't run anymore throught the Direct Admin control panel, but when I use putty and ssh :
cd /home/user/domains/mydomain.com/public_html/webcams/zestoi/bin && \ php cron.php -m webcams
it works without problem. The site is up to date.
When I use tools -> cron -> run webcams, it works without problem. The site is up to date.
- PHP Version 5.2.13
- PHP CLI version /usr/local/bin/php
- Apache 2.2.15
- DirectAdmin 1.35.1
- MySQL 5.0.67
I run two other scripts with cronjobs without problems, but they use /usr/local/bin/php .
Can i use an other cronjob command or do you know how to fix ?
Answer
most likely due to differences in the cron environment on the new server. if the other scripts use /usr/local/bin/php then use that - so your cron would become:
cd /home/user/domains/mydomain.com/public_html/webcams/zestoi/bin && \ /usr/local/bin/php cron.php -m webcams
i had a similar issue when using cron on a bsd server for a client the other day - he doesnt have zestoi - but we had a similar issue to do with php etc running from cron.
