Automating Drupal Cron on OIT Web Hosting

Drupal Version

Unless you manually configure Drupal cron to be run by your web hosting server, it will be automatically run when someone visits a page on your Drupal site after a certain amount of time has passed.  This method works perfectly fine, but can slow down the display of the page the user requested since the cron run will block page generation until it has finished.  This becomes more noticeable on site visited less frequently as more tasks can accumulate that need to be executed during a cron run.

To keep this from happening, you can schedule Drupal cron to run automatically in the background.  On a web server that you fully control, you can use UNIX style cron to run the Drupal cron job.  You can also do this on OIT Web Hosting, but you have to configure the job via the Plesk Control Panel.

Step by Step Instructions

  1. Log into your hosting account's Plesk control panel.
  2. On the main control panel page, navigate to Schedule Tasks, found in the right-hand sidebar menu.
  3. On the Scheduled Tasks page, select the Add button
  4. Fill out the form as follows (the example here will set up Drupal cron to run every eight hours):
    • Minute: 0
    • Hour: 0,8,16
    • Day of the Month / Month / Day of the Week: * (insert an asterisk)
    • In the text field, Command, enter the following:
      curl --silent --compressed http://YOURDRUPALSITE.gatech.edu/cron.php?KEY-FROM-ADMIN-REPORTS-STATUS-PAGE
      You can find the link to put at the end of this command (KEY-FROM-ADMIN-REPORTS-STATUS-PAGE) on your Drupal site's status report page at Reports -> Status report (admin/reports/status)

Video Tutorial