当我使用firebase deploy
cron 函数部署 firebase 函数时,表示它已成功部署并且相关的 Cloud Scheduler 已创建。它会在 firebase 函数控制台中创建 firebase cron 条目,但会自动创建 Cloud Scheduler。此外,当我尝试手动创建这些调度程序时,它会给出错误:
Creating job "firebase-schedule-couponCronForExpiredCoupons-us-central1" failed: Unknown error
此外,我在此列表中看不到任何调度程序:https ://console.cloud.google.com/cloudscheduler
这是我的代码:
const couponCronForExpiredCoupons = functions.region("asia-east2").pubsub.schedule("* * * * *").timeZone("Asia/Kolkata").onRun(async () => {
console.log("----------couponCronForExpiredCoupons")
return null
})
我正在关注此文档https://firebase.google.com/docs/functions/schedule-functions