1. at--to perform a task at some point in the future
Usage examples:
at time: Set a point in time
At>command
At>ctrl+d
Specify time:
Absolute Time: HH:MM,DD. Mm. Yy,mm/dd/yy
relative Time: now+3minutes
units: minutes, hours, days, weeks
Blur time: Noon,midnight,teatime
Execution result of the command: sent to the user who scheduled the task in the form of a message
Show Jobs list: ATQ = at-l
Delete Jobs task: ATRM = at-d Jobs
2, crontab--periodic execution of a task
cron: Self is a service that runs uninterrupted
Anacron:cron, can be implemented to enable Cron to perform tasks that have not been performed in the past time for various reasons in return for normal execution once
Cron:
System cron Task:/etc/crontab
User tasks for time-sharing and lunar weeks
User cron task:/var/spool/cron/username
Time-sharing week task
Valid values for time:
points: 0-59
Hours: 0-23
Day: 1-31
Month: 1-12
Week: 0-7,0 and 7 both indicate Sunday
Time-pass representation:
*: All valid values corresponding to
3 * * *: 3 minutes per hour of execution
13 12 * *: 12:13 per day
,: Discrete point in time:
10,40 * * *: 10 minutes and 40 minutes per hour (half-hour execution)
-: Continuous point in time:
10 02 * * 1-5: Weekly from Monday to Friday 2:10 execution
/: How often does the corresponding value range be executed
*/3 * * *: Executes every three minutes
Example:
executes once every two hours: 01 */2 * * *
execute once every two days: 01 02 */2 * *
Note: The first minute must give the specific value, the second minute and the time must give the specific value
Note:cron executes all commands to go down the path specified by the PATH environment variable, the absolute path should be written in the cron task, and the script should define path.
Management of User tasks:
crontab
-L: Lists all cron tasks for the current user
-E: Edit
-R: Remove All Tasks
-u USERNAME: Managing cron tasks for other users
Linux Task Scheduler