---
title: "Monitor Sidekiq periodic and cron jobs"
url: "https://cronmissed.com/guides/sidekiq.md"
canonical_url: "https://cronmissed.com/guides/sidekiq"
last_updated: "2026-10-22"
type: "how-to"
summary: "Sidekiq Enterprise periodic jobs and the sidekiq-cron gem enqueue work on a schedule; if the poller stops, nothing runs. Ping from perform."
related: ["https://cronmissed.com/guides.md", "https://cronmissed.com/guides/celery-beat.md", "https://cronmissed.com/guides/rails-whenever.md", "https://cronmissed.com/snippets/ruby.md", "https://cronmissed.com/learn/start-and-finish-pings.md"]
---

# Monitor Sidekiq periodic and 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.

Sidekiq Enterprise periodic jobs and the sidekiq-cron gem enqueue work on a schedule; if the poller stops, nothing runs. Ping from perform.

Sidekiq retries a failing job, which hides trouble, and a stopped scheduler enqueues nothing, which hides more. Whether you use Sidekiq Enterprise periodic jobs or the sidekiq-cron gem, a ping at the end of perform tells you the schedule really ran.

## How can a scheduled job fail silently on Sidekiq periodic jobs?

- With sidekiq-cron, a poller thread checks the scheduled jobs every 30 seconds by default. After downtime such as a deploy, only jobs that should have started less than 1 minute ago are caught up, so a longer outage skips runs.
- Sidekiq Enterprise periodic jobs are global to the whole cluster, and Sidekiq makes sure a single process creates the jobs. If every process is down, nothing is created.
- A job that raises an error is retried like any other job, so a failing periodic job can look busy rather than broken for days.
- Cron expressions use the Ruby process's time zone in Enterprise, and the Rails time zone (or UTC) in sidekiq-cron, so the same line can mean different hours in two apps.

## What are the limits of Sidekiq periodic jobs?

| Limit | What the documentation says |
| --- | --- |
| sidekiq-cron poll interval | Every 30 seconds by default; cron_poll_interval changes it. |
| sidekiq-cron catch-up | By default only jobs that should have started less than 1 minute ago are considered after downtime. |
| sidekiq-cron safety | Safe with several Sidekiq processes: a Redis sorted set lets only the first process enqueue each run. |
| Enterprise periodic jobs | Registered at startup; only one process creates each job; a per-job tz option is available from Enterprise 2.2.1. |
| Seconds | sidekiq-cron accepts second-level cron lines such as */30 * * * * *, and then the poll interval should be lower than the job interval. |

## How do you add a CronMissed ping to Sidekiq periodic jobs?

Wrap `perform` so that a run reports its start, its success and its failure, and re-raise the error so that Sidekiq's own retry still works.

```
require "net/http"

class NightlyReportJob
  include Sidekiq::Job
  PING = "https://ping.cronmissed.com/5f0c1b2e-7a3d-4c8e-9b61-2d4f8a7e3c10"

  def perform
    ping("/start")
    run_report
    ping
  rescue StandardError => e
    ping("/fail", e.full_message.byteslice(-100_000, 100_000))
    raise
  end

  private

  def ping(suffix = "", body = nil)
    uri = URI("#{PING}#{suffix}")
    Net::HTTP.start(uri.host, uri.port, use_ssl: true, open_timeout: 10, read_timeout: 10) do |http|
      body ? http.post(uri.request_uri, body) : http.get(uri.request_uri)
    end
  rescue StandardError
    nil # a lost ping must never fail the job
  end

  def run_report
    # the work
  end
end
```

## Which check settings fit Sidekiq periodic jobs?

Create a cron check with the same expression and time zone as the periodic registration. Grace should cover the queue delay (jobs wait behind others) and the run time; ten minutes is typical on a busy queue. Because Sidekiq retries failed jobs, the first /fail ping alerts immediately and the later success ping brings the check back up.

## How do you confirm the check works?

1. Enqueue the job once by hand with NightlyReportJob.perform_async and confirm the three pings in the log.
2. Stop all Sidekiq processes and confirm the check goes down after the grace.
3. Raise inside run_report and confirm the alert includes the end of the error.

## Questions

### Does the /fail ping on each retry cause an alert each time?

No. A failure on a check that is already down sends no new alert; the check alerts once when it goes down and once when a success brings it back.

### Where should the ping URL live?

In an environment variable or your credentials store, not in the repository. The ping URL is the check's only credential.

## Sources

- [Sidekiq wiki: Enterprise periodic jobs](https://github.com/sidekiq/sidekiq/wiki/Ent-Periodic-Jobs), read 22 October 2026
- [sidekiq-cron README](https://github.com/sidekiq-cron/sidekiq-cron), read 22 October 2026

## Related pages

- [Celery beat](https://cronmissed.com/guides/celery-beat.md)
- [Rails with the whenever gem](https://cronmissed.com/guides/rails-whenever.md)
- [Ruby](https://cronmissed.com/snippets/ruby.md)
- [Start and finish pings](https://cronmissed.com/learn/start-and-finish-pings.md)

## Related

- [Monitor cron jobs on every platform: 24 guides](https://cronmissed.com/guides.md)
- [Monitor Celery beat periodic tasks](https://cronmissed.com/guides/celery-beat.md)
- [Monitor Rails cron jobs written with whenever](https://cronmissed.com/guides/rails-whenever.md)
- [Ping CronMissed from Ruby](https://cronmissed.com/snippets/ruby.md)
- [Start and finish pings for long-running jobs](https://cronmissed.com/learn/start-and-finish-pings.md)
