Monitor Sidekiq Scheduled Jobs with CronRabbit
RubyThe Problem
Sidekiq periodic jobs can fail silently when Redis is unavailable, the worker pool is saturated, or jobs raise exceptions that exhaust retries.
The Solution
Add CronRabbit pings inside your Sidekiq worker's perform method to verify actual execution.
Monitoring Pattern
Add start/success/fail pings inside the perform method. This works with both Sidekiq's built-in periodic jobs and sidekiq-cron.
Code Examples
Sidekiq worker with monitoring
Rubyrequire 'net/http'
class DailyReportWorker
include Sidekiq::Worker
PING = "https://ping.cronrabbit.com/your-id"
def perform
Net::HTTP.get(URI("#{PING}/start")) rescue nil
begin
generate_report
send_emails
Net::HTTP.get(URI(PING)) rescue nil
rescue => e
Net::HTTP.get(URI("#{PING}/fail")) rescue nil
raise
end
end
end