Skip to main content
Home
Blog

Main navigation

  • Home
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. Knowledge Base
  4. How-To

Cron, the first thing must be done for your Drupal site

By ongetc , 26 February, 2017

Cron job, the first thing must be done for your Drupal site

Why? Might you ask?

Simple answer:
Running Cron will keep your site operating optimally.

Long answer:
Cron a scheduler that automates system tasks.

For example:
. Rotate your log and statistical data.
. Do a number of behind-the-scenes cleanup functions like clearing the sessions table.
. Many modules (like RSS feed) also schedule tasks via Cron, some modules may not behave as designed if Cron does not run.

On a small site, you can execute Drupal cron.php manually via http://yoursite.com/cron.php but it is better to do it via Cron.

Set it up once and out of your mind and out of your sight!

How to setup Cron? Very easy!

Use these steps:

Note: My host have some kind of security that block the command so I have to add space to get around it.

COMMAND is "w g e t"

. Login to your site via ssh
. At the command prompt, type "crontab -e"
. In the editor buffer type (no quote): "*/15 * * * * COMMAND -q -t 1 http://yoursite.com/cron.php"
. Hit control-X to exit and "Y" to save and "enter" to confirm

What does that line do?

It means run this task once a day, in every 15 minutes using "w g e t" command with "quiet mode" and "try 1 time" with the URL of "http://yoursite.com/cron.php"

That's it!

Forums
How-To

Reseller hosting (free)

Hosting24 (w/ ssh)

A2 Hosting

Monthly archive

  • September 2009 (14)
  • October 2009 (11)
  • January 2010 (2)
  • June 2010 (3)
  • October 2011 (1)
  • March 2012 (1)
  • July 2012 (1)
  • February 2017 (564)
  • March 2017 (5)
  • April 2017 (2)

Pagination

  • 1
  • Next page

Popular content

Last viewed:

  • PHP Nuke Evolution Xtreme
  • Kalender
  • PHPXref
  • PHP Base Library
  • easyphpalbum
  • PHP Text DB API
  • InterJinnTM
  • How do redirect www using mod_rewrite?
  • Forma Lms
  • PLUME CMS

User login

  • Reset your password