Skip to content

at

Manages one-shot scheduled jobs via the Linux at toolchain. The declaration name tags the job with a marker comment so the module can find its own jobs in the queue. Idempotent: re-applying a declaration whose tagged job is already queued reports no change.

Category: Scheduled tasks

States

StateMeaning
presentA job tagged with the declaration name is queued; if none is, one is submitted running command at time. at jobs are one-shot — once a job has run it leaves the queue, so a later run re-queues it.
absentNo job tagged with the declaration name is queued; any matching jobs are removed.

Parameters

ParameterTypeRequiredDescription
commandstringCommand to run; required for state present.
timestringThe at time spec, passed verbatim (e.g. now + 1 hour, 10:30 PM, 2026-06-01 09:00). Required for state present; must be a single line.
queuestringThe at queue letter (a single ASCII letter az). Default: a.

Examples

Schedule a one-shot reminder

at:
  backup-reminder:
    state: present
    command: /usr/bin/remind backup
    time: now + 1 hour

Queue a job on a specific queue letter

at:
  nightly-report:
    state: present
    command: /usr/local/bin/report --nightly
    time: midnight tomorrow
    queue: b

Remove any queued jobs with this tag

at:
  nightly-report:
    state: absent

Notes

  • Linux only, via the at toolchain; mutating operations fail if the at binary is absent.
  • at jobs are fire-once, not recurring — use the cron or systemd_timer modules for recurring schedules.
  • The command/time of an already-queued tagged job is not re-checked; change the declaration name (or remove it first) to queue a different job.
  • Not yet supported (planned, #109): replace-on-change re-queue, per-user queues, and batch low-load mode.