Cron and Scheduled Tasks

In order to keep the site running smoothly, and keep it up-to-date, there are a variety of chores that need to be performed on a regular basis. For example, we saw earlier in the book that the Aggregator module needed to be run on a regular basis so that it can update all its feeds. The Drupal developers are well aware that different modules all have different tasks to perform on a regular basis, so they created cron. php to manage the process.

Managing Your Website

Keeping modules up-to-speed is a case of setting the crontab (on Linux) or scheduled task (on Windows) to execute the cron. php script that is housed in the main folder of the Drupal installation. The cron.php script triggers outstanding scheduled tasks for modules that require regular updating, clearing out, or whatever.

Let's take a look at how to control the crontab, followed by setting up a scheduled task for the Windows users among us.

0 0

Post a comment