Y
Hacker News
new
|
ask
|
show
|
jobs
by
marbu
1287 days ago
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.
3 comments
ilyt
1287 days 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
link
marbu
1287 days ago
Nice, thanks for sharing this.
link
hagbarddenstore
1287 days ago
You can still use cron if you want...
link
marbu
1287 days 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.
link