Search code examples
ruby-on-railsrubyice-cube

Ice Cube Gem: Recurring Emails


Does anyone have an understanding of the ice_cube gem API? I'm trying to use it for sending reoccurring emails and I'm not sure if I understand if thats a valid use case for it or not. Does anyone have any examples? I can't find any anywhere. The existing documentations and tutorials are ambiguous and don't actually show an example of a repeating process taking place (like sending emails, deleting objects from a database, etc.). Thanks!


Solution

  • ice-cube itself isn't designed for this purpose. You'll want to use a processing tool like Sidekiq that actually runs tasks you create. ice-cube is a library tools like Sidekiq use to help with configuration, you don't need to use it directly.

    If you're sending mails periodically e.g. every week, add a plugin like sidekiq-scheduler.

    You could also just set up a cron job to send off mails according to a schedule, ifyour needs are moderate.