1. 13
  1. 3

    https://www.codyhiar.com/blog/repeated-tasks-with-systemd-service-timers-on-nixos/

    Nixos makes managing systemd services and timers a breeze. I use them for everything. Moving jobs between different machines is just an copy paste job since everything is captured in the nix config.

    1. 1

      I love systemd timers, only thing they lack is error Mail Integration like cron. Which belongs one level up probably, but still…

      1. 3

        You can use ExecStopPost= or create template service that will send e-mail on service failure.

        1. 1

          You could use https://github.com/kbslabs/open-exec-wrapper (or similar - there’s a few options) as a wrapper which supports more fancy stuff like sending the script error to rollbar.

          1. 1

            I guess the proper way of dealing with this would be to do some kind of integration via DBus to know if a unit failed.