4

If I use at to schedule a command and the trigger time is missed (e.g. due to an unexpected power failure), will it still execute at the earliest possible time? (e.g. once power comes back on and it reboots)

Example:

  1. I schedule command to run at 09:00
  2. The power goes out at 08:59
  3. The power comes back on at 09:01

Does the command ever run?

3
  • Could be easily tested by setting an at, causing a 'power failure', then seeing if the job is still in the queue after the server is back with atq.
    – Insane
    Oct 13, 2015 at 22:57
  • 5
    Not necessarily just in the queue, but also whether it will run. And yes, I agree, could be tested, but I doubt it's the first or last time this question will come up. Someone probably already knows the answer and this would be a good reference for future questions. If nobody who knows answers, I'll probably end up testing it at a convenient time and updating with an answer. That said, it could still vary by machine/OS.
    – arcyqwerty
    Oct 13, 2015 at 23:06
  • I would not call it a definitive answer, but related: unix.stackexchange.com/questions/43847/… . (The current understanding from there is "yes", it will run when next possible.)
    – ziesemer
    Aug 19, 2016 at 15:21

1 Answer 1

0

Yes, the at daemon atd processes all at jobs next time it runs.

Tested/verified on Ubuntu 18 and dockerized Alpine 3

You must log in to answer this question.

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