Scheduled task execution: 1. Use of the at command:
At/batch once
At [options] TIME
At>
At>
At>
Ctrl + d
At-l = atq view job content
At-dN = atrm cancel the task before the task expires
At-ffilename reads the specified filename
The execution result is sent to the user by email.
Same as
Crond is executed periodically
Servicecrondstatus
User use:
Crontab
-E Edit
-R Delete
-L display the task list
-UUSERNAME (defined by the Administrator)
System usage:
Edit in/etc/crontab
System cron:
/Etc/crontab
User cron:
/Var/spool/cron/USERNAME (with the same name as the user)
MinhourdaymonthweedCOMMADN
Min: 0-59
Hour: 0-23
Day: 1-31
Month: 1-12
Week: 0-7
*/5 every 5 hours, minutes ,... Run Once
, Discrete time
-Specified range
Its PATH
/Bin:/sbin:/user/bin:/user/sbin only execute commands in these directories
Therefore, it is recommended to write the absolute PATH of the command (use whichCOMMADN to view the absolute PATH of the command) or re-specify the PATH variable.
Crond does not need to be expired, but anacron is added. This command is not used to replace crond. By default
The anacron service is disabled.
/Etc/anacron
The minimum unit of anacron is day.