
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Rekiq is a recurring worker extension for Sidekiq.
Rekiq extends Sidekiq and adds functionality to schedule recurring workers.
Sidekiq is an amazing gem that allows us to execute work asynchronously, or even schedule work to be run at a given time. Now, wouldn't it be nice if it also allowed us to schedule a worker to do recurring work? That's the purpose of rekiq.
For example, rekiq allows you to schedule a worker to repeat the same work every friday at 23:00.
Tested with:
ruby 2.2.0, 2.1.1, 2.0.0
sidekiq 3.3.3
Add this line to your application's Gemfile:
gem 'rekiq'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rekiq
Require rekiq after sidekiq:
require 'sidekiq'
require 'rekiq'
We need a 'schedule' object (responsible for returning the time at which the worker should start) which must respond to method next_occurrence and receives one argument of type Time (more at The schedule object). For our example we'll be using the gem ice_cube (don't forget to require it):
# define worker as normal
class ExampleWorker
include Sidekiq::Worker
def perform(arg1, arg2)
# Do some work
end
end
# create schedule for worker to repeat every friday at 2am
schedule = IceCube::Schedule.new do |s|
s.rrule IceCube::Rule.daily.day(:friday).hour_of_day(2)
end
# now just start your worker
ExampleWorker.perform_recurringly(schedule, 'argument_1', 'argument_2')
And that's it! Now the worker will run every friday as 2am.
You can use your own schedule object, configure worker to schedule before or after work is done, set a margin, and much more! So please feel free to check wiki for more details.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that rekiq demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.