[Drupal] How to add a cron job via cpanel?

December 11, 2014 - 14:15

Cron is a job scheduler, which helps to set the list of tasks, supposed to be executed periodically. However, if you are a Drupal developer and wondering how to add the drupal cron to the cron tab, here is the way.

If you have cpanel credentials, login and find the link in the control panel to add cron. Add this line


wget http://site.com/cron.php?cron_key=VHvtw61rb8Uio0fpduJkiKoYXTU8sEwRiy2P04mb_BE

This will invoke the drupal cron in the specified intervals.In addition, specify the time interval so that the command will be executed in the specified interval.

However, the scenario would be a little different, if your site is in dev mode and have an http password protection. This command will help you to execute the Drupal cron, if your site is password protected.

wget -O - --quiet --user=user --password='pass' http://site.com/cron.php?cron_key=VHvtw61rb8Uio0fpduJkiKoYXTU8sEwRiy2P04mb_BE

Get Drupal updates straight to your inbox

To prevent automated spam submissions leave this field empty.

Post your comments / questions

Great Post.
If you don't have privilege to setup cron job, You can use this useful module to create cron:
https://drupal.org/project/EasyCron?