Monday, October 21, 2013

Cron Job Configuration Setting Guide



Cron Job Configuration Guide

 

Cron Jobs basic setup via Cpanel.

Cron Job is use to run a piece of code on certain time interval. It can done by adding following line via cpanel->Cron Jobs:
/usr/local/bin/php /home/your-site-root-dir/public_html/cron-file.php
Wget Method
* * * * *   wget –q –O- ‘http://www.domain.com/cron.php’ >/dev/null
Note: Cron commands depend on the server configuration.

 

Cron Jobs setup via SSH

-> Login to server via SSH
-> Run cd [path-homedir] command for enter the root folder
-> Run password command
-> You will see the path for root folder (eg. /home/yoursitename/public_html)
-> Run which php
-> You see path to PHP (eg. /usr/local/bin/php)
-> Run crontab –e command
-> It will open crontab file editor
-> Make changes to this file, press I key on keyboard for insert/write mode

No comments: