Create Transient Timers with systemd-run
systemd-run can wrap any command in a temporary timer/service unit — cron-like scheduling with no unit files to write.
01Command
$ sudo systemd-run --on-active=30min apt-get update02What it does
systemd-run creates transient units that live only in memory: with --on-active (a delay) or --on-calendar (a cron-style pattern) it generates a timer plus service pair automatically. The units get generated names like run-rabcdef.timer, so pass `--unit=myjob` to control the name and find them with `systemctl list-timers`. They vanish after running and on reboot, which makes this ideal for one-off delayed actions rather than permanent schedules.
03Risk
04Undo
$ systemctl stop run-<id>.timer run-<id>.service05Sources
- systemd-run(1) - run programs in transient unitsEvidence: --on-active= creates a transient timer unit which elapses after a relative timespan; --on-calendar= uses calendar event expressions; the command then runs in a transient service unit.
Last verified: 2026-09-17 · Category: System & Settings
06Related solutions
systemctl list-timers shows every scheduled timer unit with its last and next run times, which many users forget replaces cron on modern distros.
timedatectl lists, sets, and verifies the system timezone and NTP sync status on systemd distributions.
hostnamectl sets the static, transient, and pretty hostname in one step on systemd distros, no reboot required.