need a background task to run 1hour after create

12 views
Skip to first unread message

tom

unread,
May 26, 2016, 10:37:26 AM5/26/16
to Ruby on Rails: Talk
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

Przemek Kosakowski (przemosk)

unread,
May 26, 2016, 10:40:10 AM5/26/16
to rubyonra...@googlegroups.com, Ruby on Rails: Talk
Most popular gem: https://github.com/mperham/sidekiq 


-----
Przemek Kosakowski

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CADQqhMdDB7TwOOnHk_zuuGHCdAWeaZrkRpz%3DH%2BsS4U6XnYCY%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Saurav

unread,
May 27, 2016, 4:50:02 AM5/27/16
to Ruby on Rails: Talk
Checkout both https://github.com/tomykaira/clockwork and https://github.com/mperham/sidekiq 

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

Saurav

James Jelinek (shakycode)

unread,
May 27, 2016, 6:30:33 AM5/27/16
to rubyonra...@googlegroups.com
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




--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages