# Scheduled export (systemd timer) Runs `scripts/export-runner.sh` once a day at **03:30** via a systemd timer (this host has no cron daemon; the timer is native and, unlike cron, catches up a missed run with `Persistent=true` if the machine was asleep/off at 03:30). `ctrader-export.service` runs `scripts/cron-export.sh` as user `brummel` (a wrapper that sets a sane PATH, serialises with `flock`, and logs into `runtime/logs/`). ## Install (one-time, needs sudo) ```bash sudo cp deploy/systemd/ctrader-export.service deploy/systemd/ctrader-export.timer \ /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable --now ctrader-export.timer ``` ## Verify / operate ```bash systemctl list-timers ctrader-export.timer # next/last fire time systemctl status ctrader-export.service # last run result journalctl -u ctrader-export.service # service-level logs ls -t runtime/logs/ # per-run export logs sudo systemctl start ctrader-export.service # run once now, on demand sudo systemctl disable --now ctrader-export.timer # stop scheduling ``` Paths in the unit files are absolute (`/home/brummel/dev/cTrader`). If the repo moves, update `ExecStart` in `ctrader-export.service` and re-run the install steps.