I've tried Googling this, but haven't come up with any definitive answers -- how often should cron.php be run?
I know the real answer depends on the site's needs, but is there anything (dis)advantageous to running cron say 3-6 times per day versus once a day or even once a week?

Comments

kaakuu’s picture

I think it depends on
if you need search index to be updated every time a content is added
or if notification types of mails are to be sent everyday
or there are some other things like rss feeds to be updated every now and then
you need to run cron more than once every day, otherwise once in every one to two days or even one week (when the site is somewhat 'static') will suffice.

Marc Cepeda’s picture

Sounds like I'll have to run cron several times a day. I guess what I am most concerned about is performance and if there are any seriously adverse effects on the site when running cron as often as every hour.

walloon’s picture

This really depends on how many much activity is involved on each cron. For example, if you have cron-intensive activities such as those often associated with modules like XMLSitemap and FeedAPI, and lots of nodes on your site, the cron load can be significant. Otherwise, cron can be no big deal, and can run as often as once a minute without serious performance hang-ups.

WorldFallz’s picture

See http://www.metaltoad.com/blog/how-drupals-cron-killing-you-your-sleep-si... for some interesting info I had not seen elsewhere.

walloon’s picture

Thanks, hadn't seen this either, makes me think twice about how often I run cron. Yikes.

mlosee222’s picture

This thread got me thinking.

The creator of the Flashvideo module recommends setting up Cron to run every 5 minutes, because FFMPEG won't start encoding a newly uploaded video until Cron is run. And this would obviously be bad, given that Cron clears all of the cache and thus page loads will not benefit from caching.

Is there an alternative? Is there a way to trigger Cron to run after a video is uploaded? Or specify Cron to not clear the cache when it's automatically run?

Or...

If I want to use the Flashvideo module, should I just plan on running Cron ever 5 minutes and just be happy with it?

walloon’s picture

Hi Parawalk. You've probably already tried this, but there are about a half dozen very cron-related modules, such as Advanced Cron, that might give you that kind of control or granularity.

Hope that helps.

Carl Johan’s picture

As often as possible, all the time! :D

And make sure you keep track of how long it takes for each module to do their jobs. The slower modules should be penalized and only allowed to run every once in a while.