Rufus scheduler tasks on heroku running more often than scheduled

随声附和 提交于 2020-01-24 07:03:07

问题


I have a Rails app running on heroku with Rufus Scheduler added on.

A 'once a day' task in the scheduler is running more often than once a day.

My guess would be something to do with the heroku app running on different dynos during the day, but I'm at a loss on how to confirm/fix the problem.

Has anyone else seen this/know of a solution?

Edit: I couldn't resolve the problem with the gem and have moved my app over to the heroku scheduler add on which does not experience this problem.


回答1:


The Heroku scheduler isn't guaranteed, it's only a simple scheduling system designed to fill a gap. It's nothing to do with your application moving between dynos as it's a seperate management system spinning up one of processes.

If timeliness is essential to you, take a look at clockwork, which will let you configure all sorts of stuff, but also give you a bit more reliability (at the expense of having a clock process running).

If this won't do - simply rework your job so that it doesn't matter how often it runs.



来源:https://stackoverflow.com/questions/9155895/rufus-scheduler-tasks-on-heroku-running-more-often-than-scheduled

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!