(Tips) Setting up Crontab in Drupal

Tips : Setting up Crontab in Drupal

Not knowing so much about Unix commands and such setting up crontabs for your Drupal site can be a hassle. I recently noticed that my supposed crontab run wasn't functioning as expected. Patching together intelligence from several sites I finally managed to make something useful at last.

First create directory and the file that the crontab will call, in my case it was put in a bin directory on the same level as my public_html directory.
$ mkdir bin
$ cd bin
$ pico weekly.crontab.sh

We then write in the sh-file what we want to do with our crontab, in my case just calling the Drupal crontab and mailing the output of it; in my crontab I have some code that outputs some logging info.

| Read more..

Courtesy : Urbannatives.net