0eb25620ef
New `bincio sync-garmin` command mirrors sync-strava: discovers all users with garmin_creds.json, refreshes cached garth OAuth2 session, imports new activities, and optionally POSTs to the rebuild endpoint. systemd timer fires every 3h offset by 1h30m from Strava to avoid simultaneous rebuilds. Status written to _garmin_sync_status.json per user.
16 lines
486 B
SYSTEMD
16 lines
486 B
SYSTEMD
[Unit]
|
|
Description=BincioActivity Garmin sync — every 3 hours
|
|
Documentation=https://github.com/bincio/bincio-activity
|
|
|
|
[Timer]
|
|
# Fire at 01:30, 04:30, 07:30, 10:30, 13:30, 16:30, 19:30, 22:30 UTC
|
|
# Offset by 1h30m from the Strava timer to avoid simultaneous rebuilds.
|
|
OnCalendar=*-*-* 01,04,07,10,13,16,19,22:30:00
|
|
# Catch up if the VPS was offline during a scheduled run
|
|
Persistent=true
|
|
# Spread load within a 2-minute window
|
|
RandomizedDelaySec=120
|
|
|
|
[Install]
|
|
WantedBy=timers.target
|