Reputation: 389
So I have a worker. I want him to start every 2 weeks to clean some data. How can I do this? I know about perform_in and perform_at but this is not what I need.
Upvotes: 1
Views: 1856
Reputation: 7532
Scheduled, recurring jobs are not part of the core Sidekiq functionality. You can either upgrade to Sidekiq Pro, which includes support for scheduled jobs, or use an open-source scheduling plugin like sidekiq-scheduler.
With the latter, to run your job every two weeks, you'd use a config like:
your_job_name_here:
every: 2w
class: YourWorker
queue: default
description: "Runs every two weeks"
Upvotes: 3