Question

Cron job not working Ubuntu Lemp stack

Posted July 19, 2015 5.6k views
UbuntuPHPDigitalOceanLEMPLinux Commands

I have a problem getting a cron job to work with my Lemp stack.
I have a tracker installed (CPVLab) that requires two php scripts run with cron jobs.
One appears to be working with wget and url to php script. I can see start and finished entries in CPVLab error log.
I tried running the other cron job with wget but it starts and never finishes then gives php errors.,
I am now trying this syntax:
*/15 * * * * php -f /var/www/mysite.com/htdocs/cron-wurfl.php
This gives the same problem, starts then does not finish.
CPVLab is encoded with ioncube but maybe that’s not the issue here.
Advice much appreciated.
Thanks

7 comments

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Try using the full PHP CLI path,

 */15 * * * * php -f /var/www/mysite.com/htdocs/cron-wurfl.php

Also this Q&A might have a solution - https://www.digitalocean.com/community/questions/cronjob-not-running-on-ubuntu-server?answer=22492

Submit an Answer