mirror of
https://github.com/bdnugget/nix-config.git
synced 2026-11-07 09:07:27 +00:00
569 B
569 B
systemd user timer
How to run a script every 5 minutes.
{
systemd.user = {
services.hello-world = {
Unit = {
Description = "Hello script every 5 mins";
};
Service = {
Type = "oneshot";
ExecStart = "${pkgs.hello}/bin/hello";
};
};
timers.hello-world = {
Unit = {
Description = "Hello script every 5 mins";
};
Timer = {
OnCalendar = "*:0/5";
Unit = "hello-world.service";
};
Install = { WantedBy = [ "timers.target" ]; };
};
};
}