[development] cron vs poormans cron [was download statistics for core]

Robert Douglass r.douglass at onlinehome.de
Fri Jun 2 18:27:12 UTC 2006


This makes me think that there are really two types of scheduled tasks 
in Drupal; those that need to happen even if the site is inactive 
(sending a mail queue), and those that only need to happen if people are 
visiting the site. Poormans cron does a great job of the latter, but 
can't guarantee the former on a low-traffic site. An elaborate but 
potentially very useful (and user-friendly) route to take would be to 
make this distinction and introduce a hook_tasks or something similar to 
complement cron. This would basically be the poormans cron module 
reimplemented to call hook_tasks instead of hook_cron. Thus we could use 
cron for stuff that really needs it (mail, backups) and hook_task for 
stuff that *has to work* with or without cron, and is only relevant when 
somebody is looking at the site. Thus, the aggregator feeds could be run 
on hook_task.

Jeff Eaton wrote:
> This is a GREAT idea. It's worth noting that most other CMS systems,
> including WordPress, do this in their administration sections. The only
> trick, I think, is Aggregator.module's dependence on cron. Until a user
> configures that bit of the system, they won't get any security
> announcements.
>
> --Jeff
>   


More information about the development mailing list