简体   繁体   English

node.js App Engine中的cron支持

[英]cron support in node.js App Engine

I am trying to deploy a node.js app to App Engine with a cron job. 我正在尝试使用cron作业将node.js应用程序部署到App Engine。 I added the cron.yaml file to the app (as instructed here: https://cloud.google.com/appengine/docs/flexible/nodejs/scheduling-jobs-with-cron-yaml ) and deployed, but the job never gets executed. 我将cron.yaml文件添加到了应用程序中(按照此处的指示: https : //cloud.google.com/appengine/docs/flexible/nodejs/scheduling-jobs-with-cron-yaml )并进行了部署,但这项工作从未实现过被执行。

cron.yaml: cron.yaml:

cron:
- description: test cron job
  url: /api/crontest
  schedule: every 1 mins

The endpoint exists in my app and I can hit it directly from the browser, but it never executes from the cron. 端点存在于我的应用程序中,我可以直接从浏览器中访问它,但是它永远不会从cron执行。

The only thing I see in the logs is an occasional cron: unrecognized service , but it does not correspond with the one minute frequency. 我在日志中唯一看到的是一个偶然的事件cron: unrecognized service ,但它与一分钟的频率不对应。

What am I missing? 我想念什么? Is cron supported in the platform? 平台支持cron吗?

根据https://cloud.google.com/appengine/docs/flexible/java/yaml-configuration-files ,我需要运行gcloud preview app deploy cron.yaml来部署cron。

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

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