1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

systemd-unit-options: startAt can be a list

OnCalendar entrys can be specified multiple times in a systemd timer, to
make more complex scheduling possible.

Tested by manually checking the timer generated by the following:

    systemd = {
      services.huhu = {
        description = "meh";
        wantedBy = [ "default.target" ];
        serviceConfig.ExecStart = "/bin/sh -c 'printf HUHU!'";
        startAt = [ "*:*:0/30" "*:0/1:15" ];
      };
    };

It prints HUHU to the log at seconds 0, 15 and 30 of each minute.
This commit is contained in:
Profpatsch 2016-09-01 00:39:36 +02:00
parent c4e67a3dc9
commit 488f0d9cb3

View file

@ -309,7 +309,7 @@ in rec {
};
startAt = mkOption {
type = types.str;
type = with types; either str (listOf str);
default = "";
example = "Sun 14:00:00";
description = ''