diff --git a/services/phaseflow-cron.hcl b/services/phaseflow-cron.hcl new file mode 100644 index 0000000..858b9b5 --- /dev/null +++ b/services/phaseflow-cron.hcl @@ -0,0 +1,42 @@ +# ABOUTME: Periodic batch job for PhaseFlow Garmin sync. +# ABOUTME: Triggers daily sync at 6 AM to fetch fitness data and generate training recommendations. + +job "phaseflow-cron" { + datacenters = ["alo"] + type = "batch" + + periodic { + crons = ["0 6 * * *"] + prohibit_overlap = true + time_zone = "Europe/Lisbon" + } + + group "garmin-sync" { + task "trigger" { + driver = "raw_exec" + + config { + command = "/bin/sh" + args = ["local/script.sh"] + } + + template { + destination = "local/script.sh" + data = <