首页 > 解决方案 > 使用 Google Cloud Schedulers 自动关闭和启动 GCP

问题描述

我想使用 Google Cloud Scheduler 在 Google Cloud Platform 中启动/停止一组计算引擎实例。我该怎么做?

标签: google-cloud-platformgoogle-compute-enginegoogle-cloud-scheduler

解决方案


要使用 Cloud Scheduler 启动和停止 Compute Engine ,您可以按照Google 本教程或其他

我不会在此处复制粘贴所需的代码,因为教程非常完整,但我将在此处继续执行以下步骤。

  1. 设置您的 Compute Engine 实例
  2. 部署启动云函数。你可以在这里看到一个例子
  3. 部署停止云函数。你可以在这里看到一个例子
  4. 设置 Cloud Scheduler 作业

如果您需要有关本教程的任何帮助,请告诉我!


推荐阅读