Friday, February 19, 2010

Cron job settings in server

Cron jobs are used to run a script automatically with some time interval Example if you want to send emails daily morining to all newsletter subscribers when new jobs were added to your jobs portal these cron jobs are used. Below are the steps to setup cron jobs

For php:
Login to hosting server and goto the cron job settings page and select the time interval you want to run the script then give the command to run the php file as below

php /path-to-your-phpfile.php
(OR)
/usr/local/bin/php /path-to-your-phpfile.php

For Ruby:
/usr/local/bin/ruby /home/user/domainname/script/runner /home/user/domainname/app/cron_job.rb

No comments: