On Tue, Jul 19, 2022 at 8:05 AM Tom Horsley horsley1953@gmail.com wrote:
Anyone have an example of a systemd timer that runs at a specific time of day (like 1AM) so I can avoid thinking too hard? :-).
I have the following in a timer to run a prune of my backup at 6 AM Mondays:
OnCalendar=Mon *-*-* 06:00:00
So if you wanted to have a timer run daily at 1am, you could use
OnCalendar=* *-*-* 01:00:00
(If you're fine with it running at midnight, you can use OnCalendar=daily)
A more detailed discussion is at https://www.freedesktop.org/software/systemd/man/systemd.time.html#Calendar%...
Can I override an installed systemd timer by putting a replacement with the same name under /etc somewhere?
Admin-installed units go in /etc/systemd/system . I believe anything you define there will override what ships in /usr/lib/systemd although I haven't verified that myself.