Heroku调度程序添加UTC时区无法更改
我一直在研究一个需要每天在特定时间完成任务的项目。我正在使用“免费” Heroku调度程序附加组件,并且该任务已完成,但是问题在于,由于调度程序具有赢得的默认UTC时区,它的确切时间尚未完成。即使更改了应用的时区,也会更改。另外,如果有日光储蓄时间更改(因为它是UTC时区),它将无法识别该更改,并且会在错误的时间完成任务。无论如何,是否可以将时区更改为我所需要的时区?
我已经看过 heroku scheduler timezone?,似乎是在线上有任何信息它,但是没有有关如何解决问题的说明。任何帮助将不胜感激。 heroku Scheduler任务设置图像
I have been working on a project that needs to complete a task at a certain time everyday. I am using the 'free' Heroku Scheduler Add-on and the task is completed, but the problem is that it is not completed in the exact time I set for it to be completed because the scheduler has a default UTC time zone that won't change even if the time zone for app is changed. Also, if there are daylight savings time changes (since it is a UTC time zone) it won't recognize that change and will do the task at the wrong time. Is there anyway to change the time zone to my desired one which would be in US/Eastern?
I already looked at Heroku Scheduler timezone? and it seems to be the online place with any information on it, but there are no instructions on how to fix the issue. Any help would be greatly appreciated.
Heroku Scheduler Task Setup Image
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法更改HEROKU调度程序附加时间区域,唯一的解决方案是将检查逻辑的时间移至应用程序,例如,您必须每个小时运行它,然后在应用程序/命令中检查时间是否正确,是否是正确的时间,如果不存在,直到当前时间满足您的要求之前
You can not change Heroku Scheduler Add-on time zone, only solution is to move the time checking logic to your app, for example you have to run it each hour, then in your app/command check if the time is the correct time, if it's not exist the app until current time meet your requirements