1
  • resource "items"
  • controller "items" -> method "check_item"
  • view "items" -> link_to check_item

I need to create an input form for user to enter the period of time "N [seconds or minutes or hours]" and new "link_to" in my view that will create a new cronjob for check_item with N interval. Additionally I need to create buttons "Stop all scheduled jobs" and "Start all scheduled jobs".

I want to use linux crontab so I found gem "whenever"(https://github.com/javan/whenever). I dont understand how to connect variables that user enter in views, method check_item from items controller and myapp/config/schedule.rb(created by wheneverize).

iRoller
  • 23
  • 6
  • You might find [delayed_job](https://github.com/tobi/delayed_job) to be a better solution for this. `crontab`doesn't work as well when you're constantly modifying the schedule. – tadman May 10 '11 at 15:45

0 Answers0