CRONTAB Introduction * * * *
In short, crontab is a custom timer.
Crontab configuration File * * * *
- One
/var/spool/cron/
This directory contains crontab tasks for each user (including root), named after the user name
- Second:
/etc/cron.d/
This directory is used to store any crontab files or scripts to be executed.
Crontab Time Description * * * *
# .---------------- minute (0 - 59) # | .------------- hour (0 - 23)# | | .---------- day of month (1 - 31)# | | | .------- month (1 - 12) OR jan,feb,mar,apr ... # | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR#sun,mon,tue,wed,thu,fri,sat # | | | | |# * * * * * command to be executed
Minute: Represents the first part of an hour in the range 0-59.
Hour: Represents the first hour of the day, Range 0-23.
Mday: Represents the day of the one month, the range 1-31.
Month: Represents the month ordinal of a year, with a range of 1-12.
Wday: Represents the day of the week, and the range 0-7 (0 and 7 are Sunday).
Who: To use what identity to execute the directive, when you use CRONTAB-E, you do not have to add this field.
Command: The command to execute.
Crontab Service Status * * * *
sudo service crond start #启动服务sudo service crond stop #关闭服务sudo service crond restart #重启服务sudo service crond reload #重新载入配置sudo service crond status #查看服务状态
crontab Command * * * *
Reassign crontab scheduled Task List files
crontab $filepath
View Crontab Scheduled Tasks
crontab -l
Edit timed Task Delete-add-Modify
crontab -e
Alicfeng
Links: http://www.jianshu.com/p/838db0269fd0
Source: Pinterest
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.
Linux Crontab Scheduled Tasks