How to schedule jobs for python code in Firebase?

我的梦境 提交于 2021-02-10 06:22:13

问题


I want to make my code run once a day in firebase server. The code is using some pulling data out of HTTP libraries as beautiful soup. I could not find appropriate result after some search. Can you give me instructions how to do it? Thanks in advance


回答1:


You could have a look to function-cron which allows you to schedule cron jobs in Firebase.

Google App Engine provides a Cron service. Using this service for scheduling and Google Cloud Pub/Sub for distributed messaging, you can build an application to reliably schedule tasks which can trigger Google Cloud Functions. https://github.com/firebase/functions-cron




回答2:


You can now use Google Cloud Scheduler to trigger jobs via Google Pub/Sub - it's a fully managed service and very cheap to run. See here: https://cloud.google.com/scheduler/



来源:https://stackoverflow.com/questions/48851846/how-to-schedule-jobs-for-python-code-in-firebase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!