76. Job Scheduling - at
Contents
Queue, check, or delete a job that needs to be scheduled for execution.
Options
Here are some options for at command:
Option | Description |
---|---|
-q queue | Determine the priority of the queue. |
-m | Send a message to the user when the job is complete. |
-M | Do not send mail to the user. |
-f file | Read the job from a file instead of standard input. |
-t time | Execute the job at a certain time. The format can be: [[CC]YY]MMDDhhmm[.ss] |
-l | This is an alias for atq. |
-r | This is an alias for atrm. |
-d | This is an alias for atrm. |
-b | This is an alias for batch. |
-v | Display the time when the job will be executed before reading the job. |
-c | Output the list of jobs to standard input. |
Operands
Time
Here are some time operands for at command:
Operand | Description |
---|---|
midnight | 12:00 am. |
noon | 12:00 pm. |
now | Current day and time. |
Date
Here are some date operands for at command:
Operand | Description |
---|---|
today | Current day. |
tomorrow | The next day of the current day. |
Increment
Here are some increment operands for at command:
Operand | Description |
---|---|
+ N minute(s)/hour(s)/day(s)/week(s)/month(s)/year(s) | Next N units of selected time. |
next minute(s)/hour(s)/day(s)/week(s)/month(s)/year(s) | Next 1 unit of selected time. |
Examples
Run a Command After Two Minutes
|
|
After two minutes:
Run a Command After A Minute
|
|
After a minute:
References AT(1P)
Author Dong Chen
LastMod Wed Apr 17 2019