Subscribe

Enter your email address:

Delivered by FeedBurner

Previous Posts

Sunday, June 04, 2006

Drupal and crontab

So I was able to get crontab configured (thanks for the comment!). That is, I think... although I have no way to "test" the setting I made via plesk.

However, drupal also shows per-feed refresh settings in Drupal > Administer > Agreggator > Feed Overview | Edit > Update Interval.

Is this different than the crontab setting? The same? It's little things like this where you wish they just explained it in the UI.

1 Comments:

Anonymous Anonymous said...

The logic behind Drupal's cron management goes like this:

* PHP functions the programmer defines can hook up to the robot (saying "I want to be executed periodically".)

* Each hooked up function can have a different periodicity (e.g: myFirstFunction() may request to be executed every 30 minutes, while mySecondFunction() may request to be executed every other day.)

* The robot (cron.php) will see what functions are hooked, what is their periodicity, and for each function that has to be executed (current time minus last execution time for that function is greater than or equal to the specified function's periodicity,) it will execute it.

* This means that the minimum periodicity a function may specify is the periodicity on which you've set the cron.php to execute. That is, if in the Linux Crontab you've specified that cron.php should be executed every 2 hours, and if a function specifies that it should be executed every 30 minutes, then naturally that function will be executed every two hours. Therefore, best practice is to set the cron.php file to be executed at the minimum periodicity you suppose a function may request. A good time is to set cron.php to be run every hour, or better yet every thirty minutes.

In your case, if you set a particular feed to be updated every hour, then cron.php has to be run at least every hour (if not every thirty minutes)

June 05, 2006 8:03 AM  

Post a Comment

<< Home