如何取消或停止Google App Engine Cron Job [英] How to cancel or stop Google App Engine Cron Job

查看:132
本文介绍了如何取消或停止Google App Engine Cron Job的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用CRON作业的Google App Engine上部署了一个应用程序。我遵循教程。它工作正常,我可以在我的GAE控制台中进行确认。在我的Stackdriver日志中,我还可以看到CRON作业正在运行。



但我在我的 cron.xml 文件中所做的所有更改在我再次部署我的应用程序后并不适用。我甚至删除了 cron.xml 文件并再次部署我的应用程序 - 没有任何效果。我不希望CRON的工作超过任何配额。


  1. 有没有办法从GAE控制台取消/禁用/删除CRON作业?

  2. 我是否通过修改和删除 cron.xml 文件来取消CRON作业?
  3. $ b在某些情况下(特别是基于我的经验的多服务应用程序),只需上传一个 应用程序/服务可能不会自动更新cron配置。很可能是因为cron配置不是服务级配置,而是应用级配置,独立于特定服务。



    这就是为什么有专门的命令只部署cron配置。从上传cron作业


    选项2:仅上传您的cron更新

    只需更新cron配置,而不需要上传应用程序的其余部分即可,运行以下命令:

      ./ appengine- java-sdk / bin / appcfg.sh update_cron [YOUR_APP_DIR] 


    正下方,您有删除所有cron作业 - 基本上上传一个空的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.

    1. Is there a way to cancel /disable / delete a CRON job from the GAE console?
    2. Am I doing anything wrong to cancel the CRON job by modifying and deleting the cron.xml file?

    解决方案

    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:

    Option 2: Upload only your cron updates

    To update just the cron configuration without uploading the rest of the application, run the following command:

    ./appengine-java-sdk/bin/appcfg.sh update_cron [YOUR_APP_DIR]
    

    And right below that you have Deleting all cron jobs - basically uploading an empty cron config file (as opposed to just deleting the file):

    To delete all cron jobs:

    这篇关于如何取消或停止Google App Engine Cron Job的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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