Crontab is mainly used to solve the some of the sysadmin jobs which can be done by running crontab entry.
A usual crontab entry can be checked by command:
crontab -l.
Entry for crontab:
crontab -e
A typical crontab entry:
30 08 10 06 * reboot
| | | | | |
| | | | | |_ command or script which we want to run.
| | | | |
| | | | |_____DAY OF THE WEEK(0-SUNDAY OR 7-SUNDAY)
| | | |_______MONTH
| | |__________ DATE
| |______________ HOURS
|________________MINUTES
To remove crontab entries we use the command crontab -r
To view your current crontab file, use the -l (for ``list'') option:
crontab -l
To delete your file, use:
crontab -d
If you are superuser, you can delete any user's crontab file with:
crontab -d username
where username is the user's login name.
To run a crontab, crond daemon should be running.
No comments:
Post a Comment