---
title: "Monitor Railway cron jobs"
url: "https://cronmissed.com/guides/railway-cron.md"
canonical_url: "https://cronmissed.com/guides/railway-cron"
last_updated: "2026-10-22"
type: "how-to"
summary: "A Railway cron run that does not exit makes Railway skip every later run. Ping CronMissed at the end and a skipped schedule becomes an alert."
related: ["https://cronmissed.com/guides.md", "https://cronmissed.com/guides/render-cron.md", "https://cronmissed.com/guides/heroku-scheduler.md", "https://cronmissed.com/learn/overlapping-cron-runs.md", "https://cronmissed.com/snippets/nodejs.md"]
---

# Monitor Railway cron jobs

> **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.

A Railway cron run that does not exit makes Railway skip every later run. Ping CronMissed at the end and a skipped schedule becomes an alert.

Railway skips a scheduled run when the previous one is still active, and a job that does not exit keeps it active forever. One forgotten database connection can silence a cron job for weeks. A ping at the end shows the days with no run.

## How can a scheduled job fail silently on Railway cron jobs?

- Railway does not terminate a running deployment. If the previous execution is still running when the next is due, the new run is skipped.
- A cron service must exit when its task is done and leave no open resources, such as database connections. A process that keeps one open stays Active and all later executions are skipped.
- Railway does not guarantee execution to the minute; times can vary by a few minutes.
- Schedules are in UTC, and runs must be at least 5 minutes apart.

## What are the limits of Railway cron jobs?

| Limit | What the documentation says |
| --- | --- |
| Minimum gap | Scheduled runs must be at least 5 minutes apart. |
| Time zone | UTC. |
| Exit | The service is expected to exit as soon as the task is done. |
| Overlap | A new run is skipped while the previous one is Active. |
| Precision | Can vary by a few minutes. |

## How do you add a CronMissed ping to Railway cron jobs?

Ping at the end of the task, and make sure the process then exits, closing any connection pool. The Node example below ends with an explicit exit, so a stray handle cannot keep the run alive.

```
import { pool } from './db.js';

const ping = (suffix = '') =>
  fetch('https://ping.cronmissed.com/5f0c1b2e-7a3d-4c8e-9b61-2d4f8a7e3c10' + suffix, { signal: AbortSignal.timeout(10_000) }).catch(() => undefined);

await ping('/start');
try {
  await runTask();
  await pool.end();
  await ping();
  process.exit(0);
} catch (error) {
  await ping('/fail');
  await pool.end().catch(() => undefined);
  process.exit(1);
}
```

## Which check settings fit Railway cron jobs?

Create a cron check in UTC with the same expression. Give the grace a margin of at least 5 minutes, since Railway can start a run a few minutes late. A long gap between pings on a job that normally runs often is the sign of a hung run, which is exactly what Railway cannot show you; the start ping makes it explicit.

## How do you confirm the check works?

1. Deploy the service with a schedule of every 5 minutes for a test and watch two runs arrive in the check.
2. Leave a connection open on purpose and confirm that later runs are skipped and the check goes down.
3. Fix the exit and confirm the check recovers on the next run.

## Questions

### Why does Railway skip instead of killing the old run?

Railway documents that it does not terminate deployments automatically. The skip is a result of that design, so the exit in your code is the only safeguard.

### Is a 5 minute schedule fine for a heartbeat?

Yes. It is the shortest gap Railway allows, and the check works for any period of 5 minutes or more.

## Sources

- [Railway Docs: cron jobs](https://docs.railway.com/reference/cron-jobs), read 22 October 2026

## Related pages

- [Render cron jobs](https://cronmissed.com/guides/render-cron.md)
- [Heroku Scheduler](https://cronmissed.com/guides/heroku-scheduler.md)
- [Overlapping cron runs](https://cronmissed.com/learn/overlapping-cron-runs.md)
- [Node.js](https://cronmissed.com/snippets/nodejs.md)

## Related

- [Monitor cron jobs on every platform: 24 guides](https://cronmissed.com/guides.md)
- [Monitor Render cron jobs](https://cronmissed.com/guides/render-cron.md)
- [Monitor Heroku Scheduler jobs](https://cronmissed.com/guides/heroku-scheduler.md)
- [How to stop overlapping cron job runs](https://cronmissed.com/learn/overlapping-cron-runs.md)
- [Ping CronMissed from Node.js](https://cronmissed.com/snippets/nodejs.md)
