Skip to content

Instantly share code, notes, and snippets.

View z3dm4n's full-sized avatar
:octocat:
git rebase -i master

E. Zettel z3dm4n

:octocat:
git rebase -i master
  • Germany
View GitHub Profile
@z3dm4n
z3dm4n / systemd-run-as-atd-replacement.md
Last active November 2, 2023 13:47
Using systemd-run as atd replacement to run jobs at scheduled times
$ sudo systemd --version
systemd 237
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid

$ sudo systemd-run --property=WorkingDirectory=/foo/bar --property=TimeoutSec=5min --on-active="10min" command args
Running timer as unit: run-1.timer
Will run service as unit: run-1.service

$ sudo systemctl list-timers