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?

Archemar
  • 31,554
fugitive
  • 1,563

1 Answers1

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.

Kusalananda
  • 333,661
Archemar
  • 31,554
  • 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 '20 at 07:31