Delete pending at job ID 12 before it runs.
Which command is appropriate?
atrm JOB_ID removes a pending at job from the queue.
Detailed explanation
at -r 12Incorrect. The standard deletion command is atrm.
atq 12Incorrect. atq lists jobs without deleting them.
crontab -r 12Incorrect. crontab -r removes a user's entire cron table.
atrm 12Correct. atrm 12 removes job 12.
Try it yourself
An example you can run in a temporary verification environment.
atrm --help 2>&1 | sed -n '1,8p'Expected result
ジョブ番号を引数に取る使用方法Key points
- atrm means remove
- Specify the job ID
- Use atq to find IDs
Notes
- Environment: atrm help / ジョブ削除なし
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Cron
A scheduler for recurring jobs described by a time-field table.
at
A scheduler for one-time jobs queued for a specified time.
Anacron
A scheduler that can run periodic jobs after a system was unavailable.