Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
marbu
· 3y ago · 0 comments
This split between service file (what is going to happen exactly) and a timer file (when it's going to happen) is ok for complex use cases, but it really feels a bit silly when a single cron line would do the trick instead.
Comments
[–]
ilyt
3y ago
there is cmdline shortcut for one-off ones at the very least
systemd-run --user --unit=timer-name --on-active=60 /exec/path
will run it in 60 seconds
[–]
marbu
OP
3y ago
Nice, thanks for sharing this.
[–]
hagbarddenstore
3y ago
You can still use cron if you want...
[–]
marbu
OP
3y ago
Also the split allows easier debugging: one can define and run the service, check that it works, and then define a timer and test that separately.