As I cannot control the server downtime caused by my hosting provider, from now on, all missing jobs after a downtime will be executed later.
There are 3 solutions:
- Execute all missing jobs when my server is up.
This is a big bang :D and of course I don't use it :)
- Execute all missing jobs along with new jobs.
E.g, my server is down at 22:01, and it's up again at 23:01, so at 23:05, it will execute all cron jobs that should be executed at 22:05 (missing jobs) and 23:05 (new jobs).
But this may be a bit terrible if your heavy script (e.g backing up) run at the same time: if you set cron job every 30 minutes, at 23:30, it will run twice a minute :(
- Execute all cron jobs 3 times faster than normal.
With the example above, at 23:05, it will execute all cron jobs that should execute at 22:05, 22:10, 22:15.
At 23:05, it will execute all cron jobs that should execute at 22:20, 22:25, 22:30.
This will affect all normal cron jobs, but it the best way that I can do :)
After the downtime length / 2, every thing will go normally.