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

  • February 2019 (1)
  • December 2020 (224)
  • January 2021 (168)
  • March 2021 (1)

Pagination

  • Previous page
  • 2

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