GCP auto shutdown and startup using Google Cloud Schedulers

anXler picture anXler · Nov 13, 2019 · Viewed 7.6k times · Source

I want to start/stop a set of Compute engine instances in Google Cloud Platform using Google Cloud Scheduler. How can I do it?

Answer

Chris32 picture Chris32 · Nov 13, 2019

In order to start and stop a Compute Engine using the Cloud Scheduler you can follow Google this tutorial, or this other

I won’t be copy-pasting the required code here because the tutorial it's very complete but I will resume here the steps to follow.

  1. Set up your Compute Engine instances
  2. Deploy the starter Cloud Function. You can see an example in here
  3. Deploy the stop Cloud Function. You can see an example in here
  4. Set up the Cloud Scheduler jobs

If you need any help with the tutorial please just let me know!