APC Australia

Working with at

-

The at utility can be used to schedule tasks that need to be run just once. Scheduling jobs with at is easy because it accepts a variety of time formats. You can use keywords such as ‘now + 1 hour’, ‘tomorrow’, ‘oct 30’, ‘2pm tomorrow’, and ‘noon +3 days’ to define the execution time for jobs.

When you run the at ≤time≥ command containing the date, you’ll be dropped to the at prompt. Here you can enter the command or commands you wish to run. If you want to run multiple commands, press Enter after typing each. Press Ctrl-D when you’re done. You’ll be informed that a job has been created to executed the entered commands, and at also confirms the time when said job would be executed:

~≥ at 5pm tomorrow

warning: commands will be executed using /bin/sh

at≥ mkdir ~/Desktop/tempdire-should-be-deleted at≥ ≤EOT≥

job 5 at Wed Jul 15 17:00:00 2020

~≥ atq

5 Wed Jul 15 17:00:00 2020 a linuxlala 4 Wed Oct 25 12:30:00 2020 a linuxlala ~≥

The atq command can be used to print a list of scheduled jobs, and you can delete jobs with the atrm ≤job number≥ command.

Newspapers in English

Newspapers from Australia