3 ms·
I agree: I recently moved my scripts from crontab to systemd timers and there is no going back. Finally I have a proper way to debug and log. Also on NixOS I ca
by rnhmjoj 11y ago
I agree: I recently moved my scripts from crontab to systemd timers and there is no going back.
Finally I have a proper way to debug and log. Also on NixOS I can have the unit file and timer generated in very few lines.
Look at this one for example:
"xkcd" = {
description = "send latest xkcd comic";
wants = [ "network.target" ];
startAt = "Mon,Wed,Fri *:0/30";
path = with pkgs; [ telegram-cli ];
serviceConfig = {
User = "rnhmjoj";
Type = "oneshot";
ExecStart = "${cabal}/bin/xkcd";
};
} // basicEnv;
- eru 11y agoIt's a fun example, but for webcomics RSS is probably the better solution than scheduling something on your machine.