I have a task that is to monitor some information from stock website.
It should check the stock status the website every 10 minute,
Once if the stock index is rising, the check period should change to every 5 second.
If the sotck index is downing, then the check period should be 10 minute.
For running a periodic task
I found gem whenever
can do cron task.
But I have no ideas to dynamically change the check period ?
any ideas ?