Add daily 03:30 export schedule (systemd timer)
This host has no cron daemon (it is systemd-based), so schedule export-runner.sh via a
systemd timer rather than cron. cron-export.sh wraps the run with a sane PATH, flock
serialisation (no overlapping runs), and per-run logs under runtime/logs/. The timer is
Persistent, so a 03:30 run missed because the machine was asleep/off is caught up on the
next boot -- which plain cron does not do.
- scripts/cron-export.sh: scheduled-run wrapper.
- deploy/systemd/ctrader-export.{service,timer}: the units (install: sudo cp into
/etc/systemd/system/ then enable -- see deploy/systemd/README.md).
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Run the cTrader market-data export daily at 03:30
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* 03:30:00
|
||||
# Catch up a missed run (e.g. the machine was asleep/off at 03:30) on next boot.
|
||||
Persistent=true
|
||||
Unit=ctrader-export.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
Reference in New Issue
Block a user