CronManager icon indicating copy to clipboard operation
CronManager copied to clipboard

Multiple processes

Open insomnix opened this issue 11 years ago • 4 comments

I have multiple cron jobs. Some run every 15 minutes, others run once a day. Some of those once a day cron jobs takes more than 15 minutes to run. So what sometimes happens is that it will run that job twice because the "next run" doesn't update until after the cron job runs. What I think we need is the "next run" to update first or some sort of block placed on that job if it is already running.

insomnix avatar Apr 09 '13 20:04 insomnix

Each cronjob needs a started column with a boolean value.

Jako avatar Sep 15 '19 08:09 Jako

You can use flock on linux systems to block simultaneous execution of cron.php Works well for my projects.

wfoojjaec avatar Oct 12 '19 17:10 wfoojjaec

Nice idea, but what happens, when the cron job crashes or runs in a time limit? Then we could use a register_shutdown_function to clear those locks that are not removed automatically.

Jako avatar Nov 15 '19 10:11 Jako

I assume, it is partially resolved via https://github.com/Jako/CronManager/pull/46

wfoojjaec avatar Nov 28 '21 18:11 wfoojjaec

This is added in 1.4.0. Please check the 1.4.0-rc1 in https://github.com/Jako/CronManager/tree/master/_packages

Jako avatar Sep 04 '24 13:09 Jako