CRON is a utility program that comes with almost all Linux distributions. CRON is used to schedule/automate any script or program. CRONTAB is user interface for CRON.Every user has its own crontab which helps to schedule user specific tasks.
Open crontab
$ crontab –e
Edit crontab
Commands used in VIM can be used to edit and save
Display crontab
$ crontab -l
Format used in crontab entry
Example
00 07 * * 1-5 /sbin/diskusages.sh
MIN HOUR MDAY MON DOW COMMAND
MIN = Minute 0-60
HOUR = Hour [24-hour clock] 0-23
MDAY = Day of Month 1-31
MON = Month 1-12 OR jan,feb,mar,apr ...
DOW = Day of Week 0-6 OR sun,mon,tue,wed,thu,fri,sat
COMMAND = Any valid command that need to be ran.
No comments:
Post a Comment