PDA

View Full Version : [all variants] Crontab


Maky001
April 25th, 2008, 05:54 AM
I need to execute script every 5 minutes so think that cron will do the job.
But not yet working with him so please help.
Would this be ok
*/5 * * * * /var/bin/status.sh >>/var/tmp/status.log 2>&1

so every 5 minutes it execute script status.sh from var/bin and make log in var/tmp status.log.

Please correct me if i am wrong.

THX!!!!

StevenHarper
April 25th, 2008, 06:00 AM
Here is my Crontab entry that runs every 5 mins

0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/local/scripts/ascript.sh > /tmp/alog.out

Steve

kpkeerthi
April 25th, 2008, 06:23 AM
I need to execute script every 5 minutes so think that cron will do the job.
But not yet working with him so please help.
Would this be ok
*/5 * * * * /var/bin/status.sh >>/var/tmp/status.log 2>&1

so every 5 minutes it execute script status.sh from var/bin and make log in var/tmp status.log.

Please correct me if i am wrong.

THX!!!!

Perfect. Although I would put a [space] after >> for better readability.