我正在寻找一种方法来为Firebase安排 Cloud 功能,或者换句话说,在特定时间触发它们 .
目前还没有内置的runat / cron类型触发器 .
目前,最好的选择是使用外部服务定期触发HTTP功能 . 有关详细信息,请参阅functions-samples repo中的此示例 . 或者使用最近推出的Google Cloud Scheduler通过PubSub或HTTPS触发 Cloud 功能:
我还强烈建议您阅读Firebase博客上的这篇文章:How to Schedule (Cron) Jobs with Cloud Functions for Firebase和此视频:Timing Cloud Functions for Firebase using an HTTP Trigger and Cron .
您可以做的是,启动由cron作业触发的AppEngine实例并发送到PubSub . 我专门写了一篇博文,你可能想看看:
https://mhaligowski.github.io/blog/2017/05/25/scheduled-cloud-function-execution.html
2 回答
目前还没有内置的runat / cron类型触发器 .
目前,最好的选择是使用外部服务定期触发HTTP功能 . 有关详细信息,请参阅functions-samples repo中的此示例 . 或者使用最近推出的Google Cloud Scheduler通过PubSub或HTTPS触发 Cloud 功能:
我还强烈建议您阅读Firebase博客上的这篇文章:How to Schedule (Cron) Jobs with Cloud Functions for Firebase和此视频:Timing Cloud Functions for Firebase using an HTTP Trigger and Cron .
您可以做的是,启动由cron作业触发的AppEngine实例并发送到PubSub . 我专门写了一篇博文,你可能想看看:
https://mhaligowski.github.io/blog/2017/05/25/scheduled-cloud-function-execution.html