fvin
By:
fvin

Cronjob Not Running on Ubuntu Server

April 23, 2015 3.7k views
PHP

Hello everyone,

My cronjob is not working,

I have this line in the end of "/tmp/crontab.QwCzqK/crontab" file:

0 4 * * * /usr/bin/php /var/www/html/mysite.net/cron-wurfl.php

But it is not working. I should have it listed under CPVLab's error log, like this: http://screencast.com/t/LcHyZcv8

But I didn't have anything listed.

So, I decided to do it manually and visited http://mysite.net/cron-wurfl.php

And now, it shows the job as "started" but not finished: http://screencast.com/t/mZx2IYqyE

I appreciate your help,

2 comments
2 Answers

I'm having a similar issue, may be the same issue because the cron job starts but does not finish according to the error log page on cpvlabs...

My issue is once the cron job goes off, the php script goes in a loop and the log file starts to fill up space until I reboot the server.

Infinite loop - ( PHP Warning: feof() expects parameter 1 to be resource, boolean given in /sys/www/server/public_html/cron-wurfl.php on line 0)

Either one of these Cron jobs will trigger the same error in the php.log file:

0 0 * * * cd /sys/www/server/public_html/;php cron-wurfl.php

0 0 * * * php /sys/www/server/public_html/cron-wurfl.php

Could not attached entire log file sorry for the paste:
[16-May-2015 13:00:01] PHP Warning: visualStylesCheckCall(license/license.php): failed to open stream: No such file or directory in /sys/www/server/publichtml/lib/app.inc on line 0
[16-May-2015 13:00:01] PHP Warning: visualStylesCheckCall(): Failed opening 'license/license.php' for inclusion (include
path='.:/usr/share/pear:/usr/share/php') in /sys/www/server/publichtml/lib/app.inc on line 0
[16-May-2015 13:00:01] PHP Notice: Undefined index: License in /sys/www/server/public
html/lib/app.inc on line 0
[16-May-2015 13:00:02] PHP Warning: fopen(http://www.scientiamobile.com/wurfl/sffij/wurfl.zip): failed to open stream: HTTP request failed! HTTP/1.0 402 Payment Required
in /sys/www/server/publichtml/cron-wurfl.php on line 0
[16-May-2015 13:00:02] PHP Warning: feof() expects parameter 1 to be resource, boolean given in /sys/www/server/public
html/cron-wurfl.php on line 0
[16-May-2015 13:00:02] PHP Warning: fread() expects parameter 1 to be resource, boolean given in /sys/www/server/publichtml/cron-wurfl.php on line 0
[16-May-2015 13:00:02] PHP Warning: feof() expects parameter 1 to be resource, boolean given in /sys/www/server/public
html/cron-wurfl.php on line 0
[16-May-2015 13:00:02] PHP Warning: fread() expects parameter 1 to be resource, boolean given in /sys/www/server/publichtml/cron-wurfl.php on line 0
[16-May-2015 13:00:02] PHP Warning: feof() expects parameter 1 to be resource, boolean given in /sys/www/server/public
html/cron-wurfl.php on line 0
[16-May-2015 13:00:02] PHP Warning: fread() expects parameter 1 to be resource, boolean given in /sys/www/server/publichtml/cron-wurfl.php on line 0
[16-May-2015 13:00:02] PHP Warning: feof() expects parameter 1 to be resource, boolean given in /sys/www/server/public
html/cron-wurfl.php on line 0
[16-May-2015 13:00:02] PHP Warning: fread() expects parameter 1 to be resource, boolean given in /sys/www/server/public_html/cron-wurfl.php on line 0

I resolved this issue by getting an updated zip package from CPVlabs and also installing zlib extension. Using the command "yum install zlib-devel"

No php error in log any-more and cron job starts and finishes!

Have another answer? Share your knowledge.