简体   繁体   English

Google App Engine的cron作业没有显示出来

[英]Google App Engine cron job not showing up

I created a Google Cloud function that gets data and dumps it into a Google SQL Database. 我创建了一个Google Cloud功能,可以获取数据并将其转储到Google SQL数据库中。 I need this function to execute every 15 minutes. 我需要这个功能每15分钟执行一次。 As I understand it you cannot execute cloud functions in a cron job. 据我所知,你无法在cron作业中执行云功能。 The workaround is to deploy an app in the App engine. 解决方法是在App引擎中部署应用程序。

I've deployed a simple NodeJS application that makes an http request using the NodeJS https module. 我已经部署了一个简单的NodeJS应用程序,它使用NodeJS https模块发出http请求。 I've deployed this app to Google App Engine along with the following cron.yaml 我已将此应用程序与以下cron.yaml一起部署到Google App Engine

cron:
- description: "Gets new data every 15 minutes"
  url: /
  schedule: every 15 mins

But this is not executing and it is not showing up in the cron jobs list. 但这并没有执行,也没有出现在cron作业列表中。 Does the above cron job syntax look correct? 上面的cron作业语法看起来是否正确?

Is there anything else I need to do to get Google App Engine to pick up this cron job? 还有什么我需要做的才能让Google App Engine获得这个cron工作吗?

tyia tyia

I had mistakingly thought that cron.yaml would be deployed as a cron job when I executed gcloud app deploy 当我执行gcloud app deploy时,我错误地认为cron.yaml将被部署为cron作业

To deploy the cron job I had to explicitly deploy cron.yaml 要部署cron作业,我必须显式部署cron.yaml

gcloud app deploy cron.yaml

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM