Tuesday, March 10, 2015

Setup Crontab Entry in Linux


To Setup crontab fallow below step



#crontab -e
# m h  dom mon dow   command


MAILTO=nirmal_singh18@yahoo.com

#below entry will run command on every 60 minute from 6:00 AM to 8:00 PM every day

00  06-20 * * * command

#below entry will run command on 1:35 AM and 1:35 PM   and save all log in /root/error.log file



35 1,13 * * * command 2>&1 | tee -a /root/error.log

#below entry will run command on 2:00 AM every day     

0 2 * * * command

#below entry will run command on 12:00 PM, 3:00 PM, 6:00 PM, 9:00 PM  every day     


0 12,15,18,21 * * * command/script


#save and exit

Note : MAILTO option will send all the cron running status on mail

No comments:

Post a Comment

Installing Jenkins on RHEL 8 is a straightforward process. Here's a step-by-step guide

Introduction  Jenkins is an open-source automation server widely used for continuous integration (CI) and continuous delivery (CD) pipelines...