Best practice forum (Archived)

该论坛讨论已删除

 
该论坛帖子已被删除
2013年04月2日 Tuesday 12:41
该论坛帖子的内容已被删除,无法再访问。
??
Re: CRON Error - Already being executed. Quitting.
?? 发表于 2013年04月2日 Tuesday 15:09
 

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.

该论坛帖子已被删除
2013年04月2日 Tuesday 19:12
该论坛帖子的内容已被删除,无法再访问。
该论坛帖子已被删除
2013年04月2日 Tuesday 19:56
该论坛帖子的内容已被删除,无法再访问。