Systemd/timers: Difference between revisions
imported>Onny Add example systemd unit configuration |
imported>Onny mNo edit summary |
||
Line 6: | Line 6: | ||
<syntaxHighlight lang="nix"> | <syntaxHighlight lang="nix"> | ||
systemd.timers." | systemd.timers."hello-world" = { | ||
wantedBy = [ "timers.target" ]; | wantedBy = [ "timers.target" ]; | ||
timerConfig = { | timerConfig = { | ||
OnBootSec = "5m"; | OnBootSec = "5m"; | ||
OnUnitActiveSec = "5m"; | OnUnitActiveSec = "5m"; | ||
Unit = " | Unit = "hello-world.service"; | ||
}; | }; | ||
}; | }; | ||
systemd.services." | systemd.services."hello-world" = { | ||
script = '' | script = '' | ||
set -eu | set -eu |