Skip to content

GitHub Actions — alert when a scheduled workflow stopped running

A `schedule:`-driven workflow sometimes silently stops (forked repos, expired tokens, GH outages). You only realise a week later when backups are missing.

Recipe

yaml
# .github/workflows/nightly-backup.yml
name: nightly-backup
on:
  schedule:
    - cron: '0 3 * * *'   # 03:00 UTC daily
  workflow_dispatch:

jobs:
  backup:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Run backup
        run: ./scripts/backup.sh

      - name: Heartbeat ping (only on success)
        if: success()
        run: curl -fsS "$ENTERNO_HEARTBEAT_URL"
        env:
          ENTERNO_HEARTBEAT_URL: ${{ secrets.ENTERNO_HEARTBEAT_URL }}

Same thing in Enterno.io

Create a dead-man's-switch in Enterno Heartbeat with a 24h interval + 2h grace, copy the URL into an `ENTERNO_HEARTBEAT_URL` secret. If the workflow misses its schedule, the heartbeat alerts on its own.

Set up Heartbeat → ← All recipes

Related recipes

Logs or backup files eat /var; in 24 hours the server falls over. A basic df check every 10 minutes saves a 2 AM incident.