- 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).