Scheduled Jobs
Last synchronized at 2026-01-12T22:47:32Z
Sidekiq allows you to schedule the time when a job will be executed. You use perform_in(interval_in_seconds, *args) or perform_at(timestamp, *args) rather than the standard perform_async(*args):
MyWorker.perform_in(3.hours, 'mike', 1)
MyWorker.perform_at(3.hours.from_now, 'mike', 1)
This is useful for example if you want to send the user an email 3 hours after they sign up. Jobs which are scheduled in the past are enqueued for immediate execution.
Timezones
Sidekiq’s scheduling is time zone independent. Sidekiq calls .to_f on
the timestamp argument, which avoids time zone confusion. See this
issue for more details.
Checking for New Jobs
Sidekiq’s scheduler is not meant to be second-precise. It checks for scheduled jobs approximately every 5 seconds by default (15 seconds before Sidekiq 5.1). This also applies to the retry queue (see [[Error-Handling]]). You can adjust this interval:
Sidekiq.configure_server do |config|
config.average_scheduled_poll_interval = 15
end
Periodic Jobs
Sidekiq Enterprise supports periodic jobs. Other 3rd party gems also offer cron-like functionality.
Previous: [[Advanced Options]] Next: [[Deployment]]
- API
- Active-Job
- Advanced-Options
- Batches
- Best-Practices
- Build-vs-Buy
- Bulk-Queueing
- Comm-Installation
- Commercial-FAQ
- Commercial-Support
- Commercial-collaboration
- Complex-Job-Workflows-with-Batches
- Delayed-extensions
- Deployment
- Devise
- Embedding
- Ent-Encryption
- Ent-Historical-Metrics
- Ent-Leader-Election
- Ent-Multi-Process
- Ent-Periodic-Jobs
- Ent-Rate-Limiting
- Ent-Rolling-Restarts
- Ent-Unique-Jobs
- Ent-Web-UI
- Error-Handling
- FAQ
- Getting-Started
- Heroku
- Home
- Iteration
- Job-Format
- Job-Lifecycle
- Kubernetes
- Logging
- Memory
- Metrics
- Middleware
- Miscellaneous-Features
- Monitoring
- Pro-API
- Pro-Expiring-Jobs
- Pro-Metrics
- Pro-Reliability-Client
- Pro-Reliability-Server
- Pro-Web-UI
- Problems-and-Troubleshooting
- Profiling
- Really-Complex-Workflows-with-Batches
- Related-Projects
- Reliability
- Scaling
- Scheduled-Jobs
- Sharding
- Signals
- Testimonials
- Testing
- The-Basics
- Using-Dragonfly
- Using-Redis