6d0b48797a
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).
12 lines
263 B
SYSTEMD
12 lines
263 B
SYSTEMD
[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
|