Files

21 lines
873 B
Markdown

# Schedule (One-time) Tasks
Sometimes you may want to schedule a one-time task to be executed at a specific time. This can be done using the `systemd-run` command.
For example, to schedule a one-time reboot (e.g. to apply kernel patches) to the system at 4:00 AM on July 15, 2026, you can use the following command:
```bash
systemd-run --on-calendar="2026-07-15 04:00:00" --unit=onetime-reboot reboot
```
One-time timers configured like this are ephemeral/transient and will not stay in any configuration after the task has been executed. If the system happens to be off at the scheduled time, the job won't fire (it's not like anacron, which catches up missed jobs) — and after a reboot, transient systemd-run timers won't survive anyway since the system reset!
To list the configured timers you can use the following command:
```bash
systemctl list-timers
```