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,13 @@
|
||||
[Unit]
|
||||
Description=cTrader MS_SimpleExport daily market-data export
|
||||
# The export writes to the NFS-mounted data dir and logs into cTrader over the network.
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=brummel
|
||||
SupplementaryGroups=docker
|
||||
ExecStart=/home/brummel/dev/cTrader/scripts/cron-export.sh
|
||||
# A full run is ~15-20 min; allow generous head-room for gap backfills.
|
||||
TimeoutStartSec=2h
|
||||
Reference in New Issue
Block a user