For commands that need to be executed repeatedly (e.g., hourly, daily, or weekly), you can use the crontab command. The crontab command creates a crontab file containing commands and instructions for the cron daemon to execute. You can use the crontab command with the following options:
crontab -a filename
Install filename as your crontab file. On many systems,
this command is executed simply as crontab filename (i.e., without the
-a option).crontab -e
Edit your crontab file, or create one
if it doesn't already exist.crontab -l
Display your crontab file.crontab -r
Remove your crontab file.crontab -v
Display the last
time you edited your crontab file. (This option is available on only a few
systems.)crontab -u user
Used in conjunction with other options, this
option allows you to modify or view the crontab file of user. When available,
only administrators can use this option.
Each entry in a crontab file consists of six fields, specifying in the following order:
minute(s) hour(s) day(s) month(s) weekday(s) command(s)
No comments:
Post a Comment