Best practice forum (Archived)

This forum discussion has been removed

 
This forum post has been removed
Tuesday, 2 April 2013, 12:41 PM
The content of this forum post has been removed and can no longer be accessed.
? ?
Re: CRON Error - Already being executed. Quitting.
by ? ? - Tuesday, 2 April 2013, 3:09 PM
 

Hi Martinique,

very occasionally cron will crash in the middle of a run. This can result in a file cron.pid being left behind in the moodledata directory - cron checks to see if this file exists and if it does exist it assumes an instance of cron is already running.

admin/cron_watcher.php exists to keep an eye on this and to remove the cron.pid file if it is old so that cron can run again.

From the INSTALL.txt:

7. Set up a root cron task to call the file admin/cron_watcher.php every five minutes.
   The cron watcher script needs to be called *directly*, not by fetching the page through the web server (e.g. using wget or similar)  as it needs sufficient permissions to be able to kill the cron process if it has crashed. This would normally  be done using a command like this on the crontab:


   php /path/to/site/admin/cron_watcher.php > /path/to/logs/watcher.log 2>&1

If cron is repeatedly crashing though then something more serious is going on and you should get someone to examine the various Totara, web server, and system logs to try and find the error.

Hope this helps.

This forum post has been removed
Tuesday, 2 April 2013, 7:12 PM
The content of this forum post has been removed and can no longer be accessed.
This forum post has been removed
Tuesday, 2 April 2013, 7:56 PM
The content of this forum post has been removed and can no longer be accessed.