问题描述
我在使用CRON作业的Google App Engine上部署了一个应用程序。我遵循教程。它工作正常,我可以在我的GAE控制台中进行确认。在我的Stackdriver日志中,我还可以看到CRON作业正在运行。
但我在我的 cron.xml
文件中所做的所有更改在我再次部署我的应用程序后并不适用。我甚至删除了 cron.xml
文件并再次部署我的应用程序 - 没有任何效果。我不希望CRON的工作超过任何配额。
- 有没有办法从GAE控制台取消/禁用/删除CRON作业?
- 我是否通过修改和删除
cron.xml
文件来取消CRON作业? $ b在某些情况下(特别是基于我的经验的多服务应用程序),只需上传一个 应用程序/服务可能不会自动更新cron配置。很可能是因为cron配置不是服务级配置,而是应用级配置,独立于特定服务。 - Is there a way to cancel /disable / delete a CRON job from the GAE console?
- Am I doing anything wrong to cancel the CRON job by modifying and deleting the
cron.xml
file?
这就是为什么有专门的命令只部署cron配置。从:
正下方,您有 - 基本上上传一个空的cron配置文件(而不是直接删除文件):
I deployed an application to my Google App Engine that uses a CRON job. I followed this Tutorial. It works fine, I could confirm it in my GAE console. In my Stackdriver logs I can also see that the CRON job is running.
But all changes that I made to my cron.xml
file did not apply after I deployed my application again. I even deleted the cron.xml
file and deployed my application again - no effect. I do not want that CRON job to exceed any quota.
In some cases (in particular multi-service apps from my experience) simply uploading the app/service may not update the cron configuration automatically. Most likely because the cron config is not a service-level config, it's an app-level one, independent from a particular service.
Which is why there are commands specifically for deploying just the cron configuration. From Uploading cron jobs:
And right below that you have Deleting all cron jobs - basically uploading an empty cron config file (as opposed to just deleting the file):
这篇关于如何取消或停止Google App Engine Cron Job的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!