My cron job just stopped running

scstcal

New Member
Messages
2
Reaction score
0
Points
0
I have a custom php script hosted on my x10hosting.com site setup run automatically with cron job. The script ran fine for the first couple of weeks and I received an email confirmation each time it executed. But, some time last week the email confirmations stopped coming and the script is no longer running.

domain: scstcal.elementfx.com
cron command: php /home/scstcal/public_html/scripts/calsync/goosync.php
I verified the script files are still on the server in the correct location
I looked at my cpanel error log and it's blank
I tried changing the cron job schedule but that didn't help

Any ideas what might be the problem? Even if there's something wrong with the script, shouldn't I get an email?

Thanks,
dw
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Code:
/usr/bin/php -q /home/scstcal/public_html/scripts/calsync/goosync.php >>/home/scstcal/public_html/scripts/calsync/cron_log.txt 2>&1


That way any output or errors will go to cron_log.txt and you can catch them. You can add commands to the script to help debug the output.

Does the script run if you access it from the web?

Were the email notifications part of the script or from the cPanel (which should have been disabled by the Admins)?

And make sure your cron jobs never go off closer than 5 minutes apart. Otherwise the system will silently wipe them.
 

scstcal

New Member
Messages
2
Reaction score
0
Points
0
Ok, this is what the error.log says:

ERROR - Unable to Connect to ssl://www.google.com:443. Error #:

This error looks truncated but that's how it is in the log file.

And this is what the php_errorlog says:

PHP Warning: set_time_limit() has been disabled for security reasons in /home/scstcal/public_html/scripts/calsync/goosync.php on line 34

Line 34 in my script is:

set_time_limit( 600 );

Did x10hosting.com disable this? Why? It was working. The script typically completes in under 30 seconds. I tired running the script from another site, but I get the same error.

Thanks for you help.

dw
 
Top