Schedule a job on Linux Machine. ( Job Scheduler)
1. Using Cron$ crontab -ewhich will start the editor (or vi) and load the current cron table file for this user, or a blank file if none exists.
2. Time Discription
#mh hd dm my dw command
(every line starting with a pound symbol (#) is a comment) fields are:
minute of the hour
hour of the day
day of the month
month of the year
day of the week
command line
3. Crontab Examples
0 12 * * * /opt/command.sh
This command will execute every day at noon.
4. Cron Job Output
0 12 * * * /opt/command.sh > /opt/file.log
output of command.sh will be overwritten to file.log everytime cron job runs
0 12 * * * /opt/command.sh >> /opt/file.log
output of command.sh will be appended to file.log everytime cron job runs
No comments:
Post a Comment