Dec 17, 2008

Schedule a job in cron

For the task that you have to run regularly in some period, scheduling it in the cron is the one and only way for it.
For this run this in terminal:
crontab -e

This will start the vi editor and load the current cron table file for this user, or a blank file if none exists. In a new line type the following

A B C D E < path to the script > [Arguments if any]


  • A = minute of the hour

  • B = hour of the day

  • C = day of the month

  • D = month of the year

  • E = day of the week

To schedule a Task daily at 9 in the moring that lies in /home/sata/script. I use the following.
0 9 * * * /home/sata/script

No comments: