Posts

Showing posts with the label pubsub

Google Cloud Scheduler using Firebase Functions

Image
Google recently released a beta version of Google Cloud Scheduler . It makes much easier to schedule a task in firebase. https://cloud.google.com/scheduler/docs/tut-pub-sub You should enable APIs before proceed. Sorry, you have to have a billable account for continue. https://cloud.google.com/scheduler/docs/quickstart gcloud config list  gcloud config set project <projectname> gcloud components update gcloud pubsub topics create cron-job . *** name of the pub sub cron-job gcloud pubsub subscriptions create cron-sub --topic cron-job After creating that , you have to go to shecdular https://console.cloud.google.com/cloudscheduler Select the project and create a scheduled task . In target select pub sub and give the topic as the same name given in pub-sub generation above (cron-job ). After creating the job you can define the code to execute in the firebase functions. The code in the firebase...