Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run python file repeatedly every day in GCP(google cloud platform)?

I have written python code to move data from firestore to Bigquery. How can I run this code at a specified time every day? Please help beginner

like image 561
eefefeee Avatar asked Oct 21 '25 16:10

eefefeee


1 Answers

The most economical way would be to use Google Cloud Scheduler. It can initiate a job that runs on a schedule, similar to corn. Then via Pub/Sub it can invoke Google Cloud Function with your code.

Here is the tutorial, describing exactly that: https://cloud.google.com/scheduler/docs/tut-pub-sub Just use Python, instead of JavaScript for runtime.

like image 55
Anton Avatar answered Oct 23 '25 09:10

Anton