Configuring drupal cron jobs in crontab.

Drupal 7 has the ability to run cron automatically, but if there are tasks that really depend on cron, it only makes sense to ensure that cron is running in pre-defined time spans.

To make sure of that, we can configure the drupal cron to run from a server side command. So from the console, In crontab, the following line will trigger Drupal's cron

* * * * * wget -O - -q -t 1 http://example.com/macreviewzone/drupal/cron.php?cron_key=your_cron_key

The latter (<cron_key> ) can be found from the status report page (/admin/reports/status) of the drupal site, under the Cron Maintenance Tasks.

A couple of useful linux commands:

vim crontab -e (or the editor of your choice) will bring up the crontab, ready to be edited.
crontab -l : Will show the scheduled cron tasks
Tags: 
CentOS, Drupal 7, Drupal Quick Tips, Server configuration

Recent Comments

Forward by Dries Buytaert, Founder and Project Lead, Drupal; CTO Acquia.

Order now from:

Managing Expectations Podcast with DrupalEasy

Author Interview http://tinyurl.com/8a8nxno

We provide the most Shiny Drupal Bits & Pixels

Since Drupal 4.x