---
title: "Ping snippets for 12 languages and tools"
url: "https://cronmissed.com/snippets.md"
canonical_url: "https://cronmissed.com/snippets"
last_updated: "2026-10-22"
type: "index"
summary: "Copy-paste snippets that ping CronMissed from shell, Python, Go, Node.js, PHP, Ruby, C#, PowerShell, ESP boards, GitHub Actions, systemd and Docker."
related: ["https://cronmissed.com/tools/snippet-builder.md", "https://cronmissed.com/guides.md", "https://cronmissed.com/docs/pinging-api.md"]
---

# Ping snippets for 12 languages and tools

> **For AI agents:** the complete index of CronMissed pages is [llms.txt](https://cronmissed.com/llms.txt). Every page is also served as markdown at its URL plus .md.

Copy-paste snippets that ping CronMissed from shell, Python, Go, Node.js, PHP, Ruby, C#, PowerShell, ESP boards, GitHub Actions, systemd and Docker.

Every snippet sends the same three signals: a start ping, a success or failure ping, and the end of the output. Each uses HTTPS, a timeout, and ignores its own errors, so a lost ping can never fail your job.

## Languages

- [Shell and curl](https://cronmissed.com/snippets/shell.md): A shell wrapper that reports start, exit status and the end of the output to CronMissed with curl, with the flags that make a ping safe.
- [Python](https://cronmissed.com/snippets/python.md): A Python decorator that reports start, success and failure to CronMissed with only the standard library, with a timeout and no failure from the ping.
- [Go](https://cronmissed.com/snippets/go.md): A small Go helper that reports start, success and failure to CronMissed with net/http, a client timeout and the tail of the error as the body.
- [Node.js](https://cronmissed.com/snippets/nodejs.md): A Node.js helper using built-in fetch that reports start, success and failure to CronMissed with a timeout and the tail of the stack trace.
- [PHP](https://cronmissed.com/snippets/php.md): A PHP function that sends start, success and failure pings to CronMissed with curl, a timeout and the tail of the exception message.
- [Ruby](https://cronmissed.com/snippets/ruby.md): A Ruby module using Net::HTTP that reports start, success and failure to CronMissed, with timeouts and the tail of the backtrace as the body.
- [C#](https://cronmissed.com/snippets/csharp.md): A C# helper using HttpClient that reports start, success and failure to CronMissed with a timeout and the tail of the exception as the body.
- [PowerShell](https://cronmissed.com/snippets/powershell.md): A PowerShell function that reports start, success and failure to CronMissed with Invoke-RestMethod and the exit code of a native command.
- [Arduino and ESP boards](https://cronmissed.com/snippets/arduino.md): An ESP32 sketch that sends a CronMissed ping over HTTPS. Plain HTTP is redirected and fails, so the sketch needs TLS and a root certificate.

## Tools and platforms

- [GitHub Actions](https://cronmissed.com/snippets/github-actions.md): A GitHub Actions step that reports a scheduled workflow to CronMissed, with if: always() and the job status deciding the ping.
- [systemd](https://cronmissed.com/snippets/systemd.md): A systemd service and timer that ping CronMissed at the start and with the exit status, using ExecStartPre and ExecStopPost.
- [Docker](https://cronmissed.com/snippets/docker.md): A Docker entrypoint that wraps any command with CronMissed start and exit-status pings, for jobs run with docker run or Compose.

## Questions

### Can I build a snippet for my own schedule?

Yes. The snippet builder takes a schedule, a time zone and a typical run time, and writes the check settings and the snippet for crontab, systemd, GitHub Actions, Vercel, Kubernetes, EventBridge and the backup tools.

### Do the snippets work without a CronMissed account?

They run, but the ping goes nowhere. Create a check first and use its ping URL.

## Related

- [Cron monitoring snippet builder](https://cronmissed.com/tools/snippet-builder.md)
- [Monitor cron jobs on every platform: 24 guides](https://cronmissed.com/guides.md)
- [Pinging API reference](https://cronmissed.com/docs/pinging-api.md)
