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."faecherstadt-consulting-backup" = {
systemd.timers."hello-world" = {
   wantedBy = [ "timers.target" ];
   wantedBy = [ "timers.target" ];
     timerConfig = {
     timerConfig = {
       OnBootSec = "5m";
       OnBootSec = "5m";
       OnUnitActiveSec = "5m";
       OnUnitActiveSec = "5m";
       Unit = "faecherstadt-consulting-backup.service";
       Unit = "hello-world.service";
     };
     };
};
};


systemd.services."faecherstadt-consulting-backup" = {
systemd.services."hello-world" = {
   script = ''
   script = ''
     set -eu
     set -eu