Monitor Google Cloud Scheduler Jobs
Cloud Scheduler triggers an HTTP target — often a Cloud Function or Cloud Run service — on a cron schedule. Ping from inside the target after the real work succeeds, the same way you would for a scheduled Lambda.
Setup
Create an incoming monitor
Add a heartbeat monitor matching the Cloud Scheduler job's frequency.
Ping at the end of the target handler
Add the ping call after the real work succeeds, before responding.
exports.nightlySync = async (req, res) => {
// ...existing job logic...
await fetch('https://ping.pingtastic.net/ping/nightly-sync');
res.status(200).send('ok');
};Keep the schedule and grace period in sync
Check both the Cloud Scheduler job's cron expression and the monitor's grace period if you change the schedule.
Gotchas
- ⚠A Cloud Scheduler job set to "paused" stops triggering its target with no error in the target's own logs (because the target is simply never invoked) — a missed ping is often the first signal.
- ⚠Cloud Scheduler retries failed HTTP invocations according to its own retry configuration — if you see duplicate pings close together, check the job's retry settings rather than assuming your target ran twice independently.
Questions
Does Cloud Scheduler alert on failed invocations?
Cloud Scheduler logs invocation attempts and results in Cloud Logging, but there's no default proactive alert — you'd need to build a Cloud Monitoring alert policy around those logs yourself, versus a heartbeat ping which alerts by default.
Does this work if the target is Cloud Run instead of Cloud Functions?
Yes — the pattern is identical: ping at the end of the handler, after the job's real work completes successfully.
Related guides
Start monitoring your Google Cloud cloud scheduler
Set up your first monitor in under five minutes.
Get started — $5/month