惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
T
Tailwind CSS Blog
Recent Announcements
Recent Announcements
宝玉的分享
宝玉的分享
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
P
Proofpoint News Feed
D
Docker
Google DeepMind News
Google DeepMind News
aimingoo的专栏
aimingoo的专栏
B
Blog RSS Feed
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
M
MIT News - Artificial intelligence
云风的 BLOG
云风的 BLOG
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
IT之家
IT之家
H
Help Net Security
Apple Machine Learning Research
Apple Machine Learning Research
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
B
Blog
D
DataBreaches.Net

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Monitoring GitHub Actions scheduled workflows: a practica...
Kriss · 2026-04-30 · via DEV Community

Monitoring GitHub Actions scheduled workflows: a practical guide

GitHub Actions is a surprisingly capable cron scheduler. Schedule a workflow, let it run nightly, forget about it.

Until it stops running. And you don't notice for two weeks.

Scheduled workflows in GitHub Actions are quietly unreliable. GitHub delays them, skips them during high load, and — most importantly — gives you no built-in alerting when they fail silently. Adding external monitoring takes about 5 minutes and saves you from that two-week discovery.

The basic setup

Here's a minimal scheduled workflow with monitoring:

name: Nightly export

on:
  schedule:
    - cron: '0 2 * * *'  # 2am UTC every day
  workflow_dispatch:  # allows manual triggering for testing

jobs:
  export:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Run export
        run: python scripts/export.py

      - name: Ping DeadManCheck
        if: success()
        run: curl -fsS https://deadmancheck.io/ping/${{ secrets.DEADMANCHECK_TOKEN }} > /dev/null

Enter fullscreen mode Exit fullscreen mode

The last step pings DeadManCheck only if all previous steps succeeded (if: success()). If the export script fails, the ping doesn't fire, and you get alerted after your configured grace period.

Set up the monitor with a 25-hour interval (giving a 1-hour buffer on the 24-hour schedule). Store your token in GitHub: Settings → Secrets and variables → Actions → New repository secret named DEADMANCHECK_TOKEN.

Adding start/end pings for longer jobs

For jobs that run more than a few minutes, use the start/end pattern. This catches jobs that hang:

steps:
  - uses: actions/checkout@v4

  - name: Ping start
    run: curl -fsS https://deadmancheck.io/ping/${{ secrets.DEADMANCHECK_TOKEN }}/start > /dev/null || true

  - name: Run ETL
    id: etl
    run: |
      python scripts/run_etl.py
      echo "rows=$(cat /tmp/etl_row_count.txt)" >> $GITHUB_OUTPUT

  - name: Ping done
    if: success()
    run: |
      curl -fsS \
        "https://deadmancheck.io/ping/${{ secrets.DEADMANCHECK_TOKEN }}?count=${{ steps.etl.outputs.rows }}" \
        > /dev/null || true

  - name: Ping fail
    if: failure()
    run: curl -fsS https://deadmancheck.io/ping/${{ secrets.DEADMANCHECK_TOKEN }}/fail > /dev/null || true

Enter fullscreen mode Exit fullscreen mode

Your ETL script writes the row count to /tmp/etl_row_count.txt. The monitoring step picks it up and includes it in the ping — so your monitor can alert on zero-output runs, not just missed runs.

The gotchas

GitHub delays scheduled workflows

This is the big one. GitHub's docs admit that scheduled workflows may be delayed during high load. A workflow scheduled for 2:00am UTC might run at 2:23am or 2:51am. During busy periods, delays of 30–60 minutes aren't unusual.

Don't set your DeadManCheck interval to exactly 24 hours. Set it to 25 hours. That buffer absorbs GitHub's scheduling jitter without letting real failures go undetected.

Scheduled workflows stop on inactive repos

If a repository has no commits in 60 days, GitHub disables scheduled workflows. You'll get an email warning. If you miss it, the job silently stops running — and your external monitor will catch it where GitHub's notification didn't reach you.

Test with workflow_dispatch before trusting the schedule

Always add workflow_dispatch as a trigger (it's in all examples above). You can trigger the workflow manually from the Actions tab or via the CLI:

gh workflow run nightly-export.yml

Enter fullscreen mode Exit fullscreen mode

Test your monitoring integration before the first scheduled run. Confirm the ping appears in your DeadManCheck dashboard with the correct count.

Secrets aren't available in forks

If your repo is public and someone forks it, secrets.DEADMANCHECK_TOKEN will be empty in their fork. The curl will fail silently. This is fine — you don't want random forks pinging your monitor — but be aware of it when debugging.

Full production example

name: Nightly database backup

on:
  schedule:
    - cron: '0 2 * * *'
  workflow_dispatch:

jobs:
  backup:
    runs-on: ubuntu-latest
    timeout-minutes: 30  # hard limit — prevent hung jobs accumulating

    steps:
      - uses: actions/checkout@v4

      - name: Ping start
        run: |
          curl -fsS \
            "https://deadmancheck.io/ping/${{ secrets.DEADMANCHECK_TOKEN }}/start" \
            > /dev/null || true  # don't fail if monitoring is down

      - name: Configure AWS credentials
        uses: aws-actions/configure-aws-credentials@v4
        with:
          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          aws-region: us-east-1

      - name: Run backup
        id: backup
        run: |
          python scripts/backup.py
          echo "rows=$(cat /tmp/backup_row_count.txt)" >> $GITHUB_OUTPUT

      - name: Upload to S3
        run: aws s3 cp /backups/latest.dump s3://my-backups/

      - name: Ping done
        if: success()
        run: |
          curl -fsS \
            "https://deadmancheck.io/ping/${{ secrets.DEADMANCHECK_TOKEN }}?count=${{ steps.backup.outputs.rows }}" \
            > /dev/null || true

      - name: Ping fail
        if: failure()
        run: |
          curl -fsS \
            "https://deadmancheck.io/ping/${{ secrets.DEADMANCHECK_TOKEN }}/fail" \
            > /dev/null || true

Enter fullscreen mode Exit fullscreen mode

A few things worth noting:

  • timeout-minutes: 30 is a hard ceiling. Without it, a hung job can sit there for 6 hours consuming a runner.
  • || true on the monitoring pings means a DeadManCheck outage won't cause your backup job to report failed.
  • The row count flows from the backup step through $GITHUB_OUTPUT to the ping step.

After deploying

Trigger the workflow manually and confirm:

  1. The workflow runs end-to-end without errors
  2. DeadManCheck shows a recent ping on your monitor dashboard
  3. The count looks correct for what the job processed

Wait for the first scheduled run and verify again. Two successful data points before you trust it.

Scheduled workflows are one of those things that feel reliable until the day they aren't. External monitoring is the difference between finding out immediately and finding out when someone asks why the weekly report is missing.