Spaces:
Sleeping
Sleeping
Download .github/workflows/keep-alive.yml from rudratoshs/exportstatement: direct link, hf CLI and curl.
- Browser
- Download file 773 Bytes
-
https://huggingface.co/spaces/rudratoshs/exportstatement/resolve/main/.github/workflows/keep-alive.yml
- Command line
-
hf download hf://spaces/rudratoshs/exportstatement/.github/workflows/keep-alive.yml
-
curl -L -o keep-alive.yml https://huggingface.co/spaces/rudratoshs/exportstatement/resolve/main/.github/workflows/keep-alive.yml
773 Bytes
| # Keeps the Hugging Face Space awake — HF free Spaces sleep after ~48h idle, | |
| # and any HTTP request resets that timer. Runs on GitHub's infra (not a laptop). | |
| name: Keep HF Space awake | |
| on: | |
| schedule: | |
| - cron: "0 */6 * * *" # every 6 hours (well under the 48h sleep window) | |
| workflow_dispatch: # lets you run it manually from the Actions tab | |
| jobs: | |
| ping: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Ping extractor /health | |
| run: | | |
| URL="https://optionalrudra-exportstatement.hf.space/health" | |
| # --max-time 90 tolerates a cold start if it ever did nod off | |
| code=$(curl -s -o /tmp/h.json -w "%{http_code}" --max-time 90 "$URL") | |
| echo "health: $code"; cat /tmp/h.json || true | |
| test "$code" = "200" | |