【问题标题】:Repetitive cloud function only works on specific periods during the day重复云功能仅适用于一天中的特定时段
【发布时间】:2017-10-01 11:54:42
【问题描述】:

我的谷歌云函数功能应该每 5 分钟重复一次。 它仅在一天中的特定时段有效(未在我的设置中指定该行为)。 这是cron作业触发的代码:

exports.fivemins_job =
  functions.pubsub.topic('fivemins-tick').onPublish((event) => {
    console.log("This job is ran every 5 minutes!")

  }); 

cron.yaml:

cron:


- description: Push a "tick" onto pubsub every 5 minute
  url: /publish/fivemins-tick
  schedule: every 5 mins

package.json:

{
  "name": "functions",
  "description": "Cloud Functions for Firebase",
  "dependencies": {
    "@google-cloud/storage": "^0.4.0",
    "child-process-promise": "^2.2.0",
    "firebase-admin": "^4.1.2",
    "firebase-functions": "^0.5"
  },
  "private": true
}

统计:

我想让它日夜运行。我应该提供更多信息吗?

【问题讨论】:

  • 功能“日夜运行”是什么意思?
  • 每周 7 天、每天 24 小时、每 5 分钟检查一次数据
  • 看起来你已经这样设置了,除非我遗漏了什么?
  • 如果我正确阅读图表,它只是每天运行的一部分?
  • 我发现我达到了配额。问题解决了。

标签: firebase cron google-cloud-platform google-cloud-functions


【解决方案1】:

我达到了我的配额。查了logbook中的所有日志后发现,发现如下信息:

severity:  "DEBUG"  
 textPayload:  "Billing account not configured. External network is not accessible and quotas are severely limited. Configure billing account to remove these restrictions"  

【讨论】:

    猜你喜欢
    • 2021-03-21
    • 1970-01-01
    • 2020-03-09
    • 2020-10-20
    • 2017-10-15
    • 2018-08-19
    • 1970-01-01
    • 1970-01-01
    • 2019-09-08
    相关资源
    最近更新 更多