6

If I schedule something with 'at` like,

$ at noon
warning: commands will be executed using /bin/sh
at> echo "Will I be created?" > /tmp/at_test
at> <EOT>
job 12 at Fri Jun 30 12:00:00 2017

And if I reboot the machine before execution time, will my command be executed?

Unlike regular cron which schedules tasks from file, does at store this 'info' somewhere?

0

1 Answer 1

6

Jobs are stored in /var/spool/cron/atjobs in Ubuntu for instance.

Jobs are a file with some environment variable set (like $PATH, current working directory). The host can be rebooted, if the host is up, jobs will start.

man at should tell you more about it.

Note that some Unices have special cron entry like @reboot.

1
  • Addition in case anybody is interested: at stores Unix epoch of the job scheduled time in the job filename as epoch/60 in hexadecimal format.
    – Rogach
    Jul 29, 2020 at 7:31

Not the answer you're looking for? Browse other questions tagged .