Initial Setup - Cron

Cron is a job scheduler program on Unix, that basically runs a program or script on a routine basis. Some shared hosting vendors do not allow cron access for security reasons (GoDaddy shared hosting). All that occurs is based on the frequency you determine the maintenance script is run on your server. The suggested frequency for Drupal is once a day. However if you are hosting up-to-the-minute news updates from other sites (news aggregation discussed in the next volume) you will want to increase the frequency to hourly or more often in a day.

To set this properly add this command to the cron job scheduler -

fetch -o output -q http://www.yourdomainname.com/cron.php

or

wget -O - -q http://www.yourdomainname.com/cron.php

The frequency of the job is determined by the schedule you set. Most unix cron schedulers accept 5 parameters to determine the schedule

 

*     *   *   *    *  command to be executed
-     -    -    -    -
|     |     |     |     |
|     |     |     |     +----- day of week (0 - 6) (Sunday=0)
|     |     |     +------- month (1 - 12)
|     |     +--------- day of month (1 - 31)
|     +----------- hour (0 - 23)
+------------- min (0 - 59)

 

min hour day/month month day/week  Execution time
30 0 1 1,6,12 * 00:30 Hrs  on 1st of Jan, June & Dec.

:

0 20 * 10 1-5 8.00 PM every weekday (Mon-Fri) only in Oct.

:

0 0 1,10,15 * * Midnight on 1st ,10th & 15th of month

:

0 30 * * * Recommended minimum schedule - This job will run at 00:30 Hrs every day of the month
:

You can find the cron job scheduler from with your control panel of your web host. If you shared web host does not provide a cron scheduler you can use a remote cron scheduling service as a work around.

Resources

 

Video

In this video you will see how to setup cron for your Drupal installation




back                   next

Average rating
(0 votes)
Technorati Tags:

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

 


Free 30 Day Course
with Videos To Increase
Your Site Traffic & Conversions

First Name
Primary e-mail
Our Strict Privacy Policy keeps
your e-mail safe and secure.


Free 30 Day Drupal
Large Screen Video
Training Course For You

First Name
Primary e-mail
Our Strict Privacy Policy keeps
your e-mail safe and secure.