Dipesh Adhikari
Dipesh Adhikari

Reputation: 35

How to run Python script in Cron in GCP?

I would like to get a help from you. I am trying to deploy my python script to google cloud and execute it as cron. I am unable to deploy it to google cloud as i am unable to it work. Can anyone help me with this? Thanks in advance.

Upvotes: 0

Views: 1015

Answers (1)

guillaume blaquiere
guillaume blaquiere

Reputation: 75790

In your use case, you have to deploy your python somewhere.

In both case, I recommend you to use container to package your code.

Then you have to schedule that runtime.

  • Call the Cloud Run Job execution API directly with Cloud Scheduler (Be careful, for now, you can't send parameters to your jobs, only trigger a run)
  • Call the Batch API directly with Cloud Scheduler and with the config in the body

Upvotes: 3

Related Questions