Allow cron to run only during a certain time
mikeytown2 - September 17, 2009 - 20:07
| Project: | Poormanscron |
| Version: | 6.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | won't fix |
Jump to:
Description
Let's say I only want cron to run between midnight and 4am.

#1
I would think this probably be a more appropriate general-cron solution. I'm thinking a small contrib module with a very low (negative) module weight that implements hook_cron() and calls exit() if a certain time.
I don't think this should be appropriate for poormanscron.
#2
Or if you need more complex cron timing issues, set up your own cron job to run on certain times.
#3
Thats a feature thats available for people with cron jobs; just trying to bring more of the customizable side of having your own cron job to this project. If a patch appears, would you be willing to commit it?
#4
#5
The simpler way to do this would be to have the trigger time be the same Hour if on a 24hr clock, or always at the same Minute if on a Per Hour base, ect... ensures consistent cron runs to the best of the ability of this module, given the limitations.
#6
I'd be willing along with the other co-maintainers to consider it for 6.x-1.x, but not for 6.x-2.x, since I would really like to keep it a *very* simple version of the Drupal 7 backport.
#7
I don't think this is appropriate for just this module. This could be easily accomplished as a new module so it supports all forms of cron run, if it has a very low weight and checks the time and exits if it's not the desired time.