need a background task to run 1hour after create

which toll should i use? my task needs to be run after 1 hour or other time unit afte r the record has been created.

thx

tom

Most popular gem: https://github.com/mperham/sidekiq

Checkout both https://github.com/tomykaira/clockwork and GitHub - mperham/sidekiq: Simple, efficient background processing for Ruby

I have used both of them for scheduling different kind of background jobs.

Saurav

I second this. Sidekiq (especially version 4) is amazing. Clockwork is great too for scheduling recurring jobs. There was a sidetiq which would schedule sidekiq jobs however it is not actively being developed and lacks sidekiq 3.5.1 and 4.0 support. You have to use a version that’s back ported with Celluloid 0.17.1 (I think that’s the version number). I’d stay away from sidetiq and focus on clockwork and sidekiq itself.

If sidekiq becomes too much technical debt and you need something that just works and is easy to use minus the reds dependency and monitoring with bluepill or god, I recommend sucker_punch https://github.com/brandonhilkert/sucker_punch. It does not have job re-enqueing or persistence past the memory space (if you restart your app server (puma/passenger/unicorn) you lose your pending jobs. But it’s a great little gem and I use it for lots of small projects where sidekiq is overkill.

Cheers,

James

Subscribe to my Youtube Channel: https://www.youtube.com/shakycode