Working with Cron Jobs in Drupal 7

A cron job is script on the server that is set to run at specific intervals. When you install Drupal 7, it configures its own cron job that handles many important system tasks, such as:

  • Searching for updates to the Drupal core
  • Searching for updates to the Drupal modules
  • Indexing your website’s content
  • Running routine maintenance tasks such as clearing log files

Setting the Frequency of the Cron Drupal 7

By default the cron job in Drupal 7 runs every 3 hours. However, since running the cron job and be intensive on the server, if you do not need to have it run every 3 hours it’s best practice to set a lower time to run. Keep in mind. At any time, you can manually run the cron job which we’ll cover in the next section.

  1. Log into the Drupal Dashboard
  2. Go to Configuration >> System >> Cron
  3. Change the cron job frequency from the drop down menu
  4. drupal_cron_1

  5. Click “Save configuration

running the Cron Manually in Drupal 7

Anytime you add content to your site you will want to run the cron. Since the cron job handles indexing of the content on your site, running the cron will make the newly added content searchable through the search bar on your website.

  1. Log into your Drupal dashboard
  2. Go to Configuration >> System >> Cron
  3. Click “Run cron
  4. drupal_cron_2

For more step-by-step guides and practical tips, visit our Drupal Education Channel.

Carrie Smaha
Carrie Smaha Senior Manager Marketing Operations

Carrie enjoys working on demand generation and product marketing projects that tap into multi-touch campaign design, technical SEO, content marketing, software design, and business operations.

More Articles by Carrie

Was this article helpful? Join the conversation!