Skip to content

keep-alive

keep-alive #1246

Workflow file for this run

name: keep-alive
# Resurrection knock for the Render free-tier dyno. The app keeps ITSELF awake
# once running (self-ping thread in cloud/app.py — see "self keep-alive"); this
# workflow just wakes it back up if it ever sleeps (quiet-hours window, Render
# maintenance restart). GitHub dequeues */5 crons every 1.5-2.5h in practice,
# which is fine for that job but useless as the primary keep-warm — that's why
# the self-ping exists. Auto-disables after 60 days of no repo commits.
on:
schedule:
# Every 5 min, but only ~7am-1am Central (12:00-06:00 UTC) so we don't burn
# the whole 750 free instance-hours/month keeping it awake at 4am.
- cron: "*/5 0-6,12-23 * * *"
workflow_dispatch: {}
jobs:
ping:
runs-on: ubuntu-latest
steps:
- name: ping render /healthz
run: |
URL="https://transcript-app-cloud.onrender.com/healthz"
for i in 1 2 3; do
code=$(curl -s -o /dev/null -w "%{http_code}" --max-time 60 "$URL" || true)
echo "attempt $i -> HTTP $code"
[ "$code" = "200" ] && exit 0
sleep 20
done
echo "healthz never returned 200"; exit 1