Heroku上的Rufus调度程序任务运行频率比预定的要高 [英] Rufus scheduler tasks on heroku running more often than scheduled

查看:115
本文介绍了Heroku上的Rufus调度程序任务运行频率比预定的要高的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行在Heroku上的Rails应用程序,并添加了Rufus Scheduler。

调度程序中的每日一次任务每天运行的频率高于每天一次。

我的猜测与在一天中运行在不同dynos上的heroku应用程序有关,但我在如何确认/解决问题方面遇到困难。



编辑:我无法解决问题与宝石,并已将我的应用程序移动到heroku调度程序添加其上不会遇到此问题。

解决方案

Heroku调度程序没有保证,它只是一个简单的调度系统,旨在弥补差距。这与您的应用程序在dynos之间移动无关,因为它是一个独立的管理系统,正在启动一个流程。



如果时间对您而言至关重要,请查看发条,它可以让你配置各种东西,但也给你更多的可靠性(牺牲有一个时钟进程正在运行)。



如果这样做不行 - 只需重新完成您的工作,以便它运行的频率无关。


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.

解决方案

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.

这篇关于Heroku上的Rufus调度程序任务运行频率比预定的要高的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆