Reviewed on 2012-05-03
After a successful Drupal install, you will need to setup a cron job to index the site regularly. Site search and RSS aggregation rely on regular site indexing. There are several ways to accomplish this, which are detailed below.
ITS Scheduling Service
The Scheduling Service is now live at https://tools.stanford.edu/cgi-bin/scheduler - it has greatly simplified the process of setting up cron.
- Go to the Scheduling Service web page and choose "Create New Job".
- For "Command", enter:
curl -sS https://www.stanford.edu/path/to/your/drupal/installation/cron.php
(See note below on where to find the URL to use for Drupal 7) - "Run this command as this principal": You should enter the cgi principal of the AFS group; that way, anyone in the -admins group of your AFS space can edit the cron job.
- Schedule: For most Drupal sites it's sufficient to set it to Every Hour. More active sites can run cron more often, less active sites can run it less often.
- Click Save Job
![Screenshot of Scheduling Service interface showing a configured cron job](https://techcommons.stanford.edu/system/files/Picture%203.jpg)
Configuring your cron job
Poor Man's Cron Module
Another solution is to use the Poor Man's Cron module.
Advantages: Reliable, and it's configured from within your Drupal user interface.
Disadvantages: It's one more Drupal module to load, install, configure, and update; it also relies on a page request (any page request) to trigger the cron script.
Drupal 7
While Drupal 7 has poor man's cron functionality built-in, it's still recommended to have the scheduling service run cron for your site instead. A cron key (to prevent others from running cron on your site) is created for your site during installation (it looks like this: cron.php?cron_key=QVAouqsLW1_gxco4K1a4gfebVeOmPuNp7h-mxN3NBvQ) . You can find this key and the full URL to cron.php under "Reports / Status" at admin/reports/status.