Let's say I only want cron to run between midnight and 4am.

Comments

dave reid’s picture

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.

dave reid’s picture

Or if you need more complex cron timing issues, set up your own cron job to run on certain times.

mikeytown2’s picture

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?

mikeytown2’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
mikeytown2’s picture

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.

dave reid’s picture

Version: 6.x-2.x-dev » 6.x-1.x-dev

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.

dave reid’s picture

Status: Active » Closed (won't fix)

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.

francewhoa’s picture

@mikeytown2: elysia_cron is able to do that. http://drupal.org/project/elysia_cron