Skip to content

CronSignal/ping-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CronSignal Ping Action

Monitor your GitHub Actions cron jobs with CronSignal. Get alerted via email, Slack, Discord, Telegram, or webhook when scheduled workflows fail or stop running.

Why?

GitHub Actions schedule triggers can be delayed, skipped, or silently disabled. If your nightly backup, data sync, or cleanup job stops running, you might not notice for days. CronSignal watches for missing pings and alerts you immediately.

Quick Start

  1. Create a free CronSignal account
  2. Create a monitor with the same schedule as your workflow
  3. Add your check ID as a repository secret named CRONSIGNAL_CHECK_ID
  4. Add the ping step to your workflow:
name: Nightly Backup
on:
  schedule:
    - cron: '0 3 * * *'

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

      - name: Run backup
        run: ./backup.sh

      - name: Ping CronSignal
        if: always()
        uses: CronSignal/ping-action@v1
        env:
          JOB_STATUS: ${{ job.status }}
        with:
          check-id: ${{ secrets.CRONSIGNAL_CHECK_ID }}
          ping-on-failure: fail

Inputs

Input Required Default Description
check-id Yes Your CronSignal check ID (UUID). Store as a repository secret.
ping-on-failure No skip What to do when the job fails: skip (no ping — CronSignal alerts on the missed ping), fail (send explicit failure signal for immediate alert), or ping (ping anyway — treat failure as success).
send-output No false Send workflow metadata (run URL, ref, SHA) as ping output, viewable in the CronSignal dashboard.
api-url No https://api.cronsignal.io API base URL override.

Failure Handling

The ping-on-failure input controls behavior when previous steps fail:

  • skip (default) — No ping is sent. CronSignal treats the missing ping as an outage and alerts after the grace period. Best for most cases.
  • fail — Sends an explicit failure signal to CronSignal's /fail endpoint, triggering an immediate alert without waiting for the grace period.
  • ping — Sends a normal ping regardless of job status. Use this if you only care about whether the workflow ran, not whether it succeeded.

Important: Always use if: always() on the ping step so it runs even when previous steps fail. Without this, GitHub skips the step entirely on failure.

Examples

Basic — alert on missed ping

- name: Ping CronSignal
  if: always()
  uses: CronSignal/ping-action@v1
  env:
    JOB_STATUS: ${{ job.status }}
  with:
    check-id: ${{ secrets.CRONSIGNAL_CHECK_ID }}

Immediate failure alert

- name: Ping CronSignal
  if: always()
  uses: CronSignal/ping-action@v1
  env:
    JOB_STATUS: ${{ job.status }}
  with:
    check-id: ${{ secrets.CRONSIGNAL_CHECK_ID }}
    ping-on-failure: fail

With workflow metadata

- name: Ping CronSignal
  if: always()
  uses: CronSignal/ping-action@v1
  env:
    JOB_STATUS: ${{ job.status }}
  with:
    check-id: ${{ secrets.CRONSIGNAL_CHECK_ID }}
    send-output: 'true'
    ping-on-failure: fail

How It Works

  1. You add this action as the last step in your scheduled workflow
  2. On success, it pings GET /ping/{check-id} — CronSignal resets the timer
  3. On failure (with ping-on-failure: fail), it hits POST /ping/{check-id}/fail — CronSignal alerts immediately
  4. If no ping arrives within your configured schedule + grace period, CronSignal alerts you

License

MIT

About

Monitor your GitHub Actions cron jobs with CronSignal. Get alerted when scheduled workflows fail or don't run.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors