{"id":22997735,"url":"https://github.com/mattyr/sidecloq","last_synced_at":"2025-10-11T00:08:03.100Z","repository":{"id":53842656,"uuid":"48465987","full_name":"mattyr/sidecloq","owner":"mattyr","description":"Recurring / Periodic / Scheduled / Cron job extension for Sidekiq","archived":false,"fork":false,"pushed_at":"2024-02-14T09:58:52.000Z","size":199,"stargazers_count":87,"open_issues_count":5,"forks_count":13,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-07T16:22:51.712Z","etag":null,"topics":["cron","leader-election","periodic","rails","recurring","schedule","sidekiq"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattyr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-23T03:04:37.000Z","updated_at":"2025-08-23T11:25:48.000Z","dependencies_parsed_at":"2022-08-21T01:50:19.534Z","dependency_job_id":"e16aab37-5002-4d75-8b78-c9485c2b73a4","html_url":"https://github.com/mattyr/sidecloq","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/mattyr/sidecloq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattyr%2Fsidecloq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattyr%2Fsidecloq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattyr%2Fsidecloq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattyr%2Fsidecloq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattyr","download_url":"https://codeload.github.com/mattyr/sidecloq/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattyr%2Fsidecloq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005645,"owners_count":26083940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cron","leader-election","periodic","rails","recurring","schedule","sidekiq"],"created_at":"2024-12-15T06:08:16.696Z","updated_at":"2025-10-11T00:08:03.081Z","avatar_url":"https://github.com/mattyr.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Sidecloq](assets/clock_a_clock_on_the_side.png)\n\n# Sidecloq\n\n[![CI](https://github.com/mattyr/sidecloq/actions/workflows/ci.yml/badge.svg)](https://github.com/mattyr/sidecloq/actions/workflows/ci.yml)\n[![Gem Version](https://badge.fury.io/rb/sidecloq.svg)](https://badge.fury.io/rb/sidecloq)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/65e94000ebd0b9043b1d/test_coverage)](https://codeclimate.com/github/mattyr/sidecloq/test_coverage)\n[![Maintainability](https://api.codeclimate.com/v1/badges/65e94000ebd0b9043b1d/maintainability)](https://codeclimate.com/github/mattyr/sidecloq/maintainability)\n\nRecurring / Periodic / Scheduled / Cron job extension for\n[Sidekiq](https://github.com/mperham/sidekiq)\n\n## Why\n\nThere are several options for running periodic tasks with Sidekiq,\nincluding [sidekiq-scheduler](https://github.com/Moove-it/sidekiq-scheduler),\n[sidekiq-cron](https://github.com/ondrejbartas/sidekiq-cron), as well as\n[Sidekiq Enterprise](https://sidekiq.org/products/enterprise.html).  Each tackles the\nproblem slightly differently. Sidecloq is inspired by various facets\nof these projects, as well as\n[resque-scheduler](https://github.com/resque/resque-scheduler). I urge\nyou to take a look at all of these options to see what works best for\nyou.\n\nSidecloq is:\n\n- **Clean:** Sidecloq leverages only the public API of Sidekiq, and does\n  not pollute the Sidekiq namespace.\n- **Easy to deploy:** Sidecloq boots with all Sidekiq processes,\n  automatically.  Leader election ensures only one process enqueues\n  jobs, and a new leader is automatically chosen should the current\n  leader die.\n- **Easy to configure:** Schedule configuration is done in YAML, using\n  the familiar cron syntax. No special DSL or job class mixins required.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'sidecloq'\n```\n\nRequires sidekiq version \u003e= 6.4.  MRI \u003c 2.7 and jruby \u003c 9.4 are not supported.\n\n## Configuration\n\n### Quickstart\n\nTell Sidecloq where your schedule file is located:\n\n```ruby\nSidecloq.configure do |config|\n  config[:schedule_file] = \"path/to/myschedule.yml\"\nend\n```\n### Rails\n\nIf using Rails, and your schedule is located at config/sidecloq.yml,\nSidecloq will find the schedule automatically (ie, you don't have to use\nthe above configuration block).\n\n## Schedule file format\n\n### Example:\n\n```yaml\nmy_scheduled_job: # a unique name for this schedule\n  class: Jobs::DoWork # the job class\n  args: [100]       # (optional) set of arguments\n  cron: \"* * * * *\" # cron formatted schedule\n  queue: \"queue_name\" # Sidekiq queue for job\n\nmy_scheduled_job_with_args:\n  class: Jobs::WorkerWithArgs\n  args:\n    batch_size: 100\n  cron: \"1 1 * * *\"\n  queue: \"queue_name\"\n\nmy_other_scheduled_job:\n  class: Jobs::AnotherClassName\n  cron: \"1 1 * * *\"\n  queue: \"a_different_queue\"\n```\n\n### Rails\n\nIf using Rails, you can nest the schedules under top-level environment\nkeys, and Sidecloq will select the correct group based on the Rails\nenvironment.  This is useful for development/staging scenarios. For\nexample:\n\n```yaml\nproduction:\n  # these will only run in production\n  my_scheduled_job:\n    class: Jobs::ClassName\n    cron: \"* * * * *\"\n    queue: \"queue_name\"\n\nstaging:\n  # this will only run in staging\n  my_other_scheduled_job:\n    class: Jobs::AnotherClassName\n    cron: \"1 1 * * *\"\n    queue: \"a_different_queue\"\n```\n\n## Web Extension\n\nAdd Sidecloq::Web after Sidekiq::Web:\n\n```ruby\nrequire 'sidekiq/web'\nrequire 'sidecloq/web'\n```\n\nThis will add a \"Recurring\" tab to the sidekiq web ui, where the loaded\nschedules are displayed.  You can enqueue a job immediately by clicking\nit's corresponding \"Enqueue now\" button.\n\n![Sidecloq web ui extension screenshot](assets/screenshot.png)\n\n## Contributing\n\nBug reports and pull requests are welcome.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattyr%2Fsidecloq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattyr%2Fsidecloq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattyr%2Fsidecloq/lists"}