|Subject:||Re: using Monit do restart cron|
|Date:||Fri, 17 Aug 2012 18:54:39 +0200|
the test which you have is correct to restart cron if it isn't running (crashed or was stopped).
In the case that the cron process is running, but not executing the tasks, you can add for example some cronjob, which will touch some file to signalise, that the tasks are executed, and then set monit, to check that the timestamp is updated … if the task is run every 5 minutes, you can use something like this:
check file cron_test with path /tmp/monit_cron_test
if timestamp > 6 minutes then exec "/usr/bin/monit restart cron"
and the cronjob:
*/5 * * * * /usr/bin/touch /tmp/monit_cron_test
On Aug 17, 2012, at 5:16 PM, "Alexandre Carlos Vilarinho de Oliveira" <address@hidden> wrote:
|[Prev in Thread]||Current Thread||[Next in Thread]|