Use runitor as a task scheduler
mainRunitor can act as a long-running process that executes a command at specified intervals, serving as a lightweight alternative to cron or systemd.timer.
- Interval-based: Use the
-every <duration>flag (e.g.,-every 2h24m). - Cron-based: Use the
-at <cron>flag (e.g.,-at "00 02,14 * * *").
Triggering an immediate run
If runitor is running in periodic mode, you can force it to execute the command immediately and reset its interval timer by sending a SIGALRM signal to the process:
pkill -ALRM runitorrunitor -slug db-backup -at "00 02,14 * * *" -- /script/db-backup