In: Computer Science
It is a Examples of crontab entries
On Unix-like operating systems, the crontab command opens the cron table for editing. The cron table is the list of tasks scheduled to run at regular time intervals on the system.
The daemon which reads the crontab and executes the commands at the right time is called cron. It's named after Kronos, the Greek god of time.
Run the shell script /home/melissa/backup.sh on January 2 at 6:15 A.M:
15 6 2 1 * /home/melissa/backup.sh
Days and months can be listed by name (Monday) or abbreviation (Jan). Zeroes at the beginning of a number are valid, which can help you make multiple entries line up visually.
For instance, the next example runs the same script as above, at 12:01 A.M., every Monday in January:
01 00 * Jan Monday /home/melissa/backup.sh
Run /home/carl/hourly-archive.sh every hour, on the hour, from 9 A.M. (09:00) through 6 P.M. (18:00), every day:
00 09-18 * * * /home/carl/hourly-archive.sh
Same as the above, but run it every twenty minutes:
*/20 09-18 * * * /home/carl/hourly-archive.sh
Run /home/wendy/script.sh every Monday, at 9 A.M. and 6 P.M:
0 9,18 * * Mon /home/wendy/script.sh
Run /usr/local/bin/backup at 10:30 P.M., every weekday:
30 22 * * Mon,Tue,Wed,Thu,Fri /usr/local/bin/backup