0

I am new to ruby on rails I need to create a task that should send emails every 5 minute in windows using ruby on rails, Can anybody suggest me how can i accomplish this ?

Thanks in advance.

Pinki
  • 71
  • 1
  • 10
  • Take a look at [this gem](https://github.com/jmettraux/rufus-scheduler). Maybe it'll helps you – Mikhail Katrin Dec 21 '17 at 10:17
  • Possible duplicate of [Ruby on Rails how to get started with whenever cron in Windows 10](https://stackoverflow.com/questions/47920501/ruby-on-rails-how-to-get-started-with-whenever-cron-in-windows-10) – Samy Kacimi Dec 21 '17 at 10:38
  • @MikhailKatrin , that gem is working with the use of rake file, thanks a lot but its taking too much time to execute the respected task . – Pinki Dec 22 '17 at 06:31

1 Answers1

0

You can implement the script in ruby and then use cron to set it and be executed every 5 minutes. This is an example that how it would work in linux:

script.sh

/path/to/ruby.exe /path/to/your/ruby/script.rb

cron

*/5 * * * * /path/to/your/script.sh

Check This websites for more information: - How to use cron in windows: Cron for Windows

maguri
  • 386
  • 2
  • 10