Scheduled GCE VM instance startup and shutdown
I'm using GCE for a small R&D project with limited budget. We would like to be able to start/stop instances automatically on a schedule e.g. to run database instances during office hours but shut them down out of hours to save costs. As far as I can tell, there is no instance scheduler in the current GCE toolset.
With the recent release of Google Cloud Scheduler to beta, we’ve published a step-by-step tutorial on using Cloud Scheduler to schedule start/stop of GCE VM instances. Please take a look!
In parallel, we’re also looking into ways to make scheduling VM operations even easier.
brother printer commented
It is a great post. It's been such a wonderful experience while reading your blog. If facing any problem related to printer please visit us Brother printer error state
To stop & start with schedule why do I want to use other product like pub/sub & function.
This is not the right way in the instance create you can simply add crontab pattern
Time List Of Action
TextBox Scroll list
* 7 * * * Action Stop Instance
I would like to see it to be able set and scheduled not by time but by the amount of ordinary visitor. Let say in a week or in a month that previously runned.
But google cloud scheduler doesn't work for all region.
Meng-Ze Chen commented
I think you could set a stopwatch to terminate an instance. For example, when launch a vm instance, I can setup this vm's running time, say, 1 hour. After that 1 hour, the vm shutdown automatically.
Howard Curtis commented
You can also check out Cloud Thrifty, www.cloudthrifty.com (in beta on GCP). It is very simple to set up and all you need to do is add a label to your instances.....super easy.
I know I am bumping an old thread on this, but this is also available for instances on a free tier from www.parkmycloud.com with no instance limits. Unfortunately GCP does not yet support stop/start of its native database services, but this could be a reason to go with a customer-managed DB. -- Bill
Vadim Solovey commented
matthew taylor commented
VMPower free tier is prohibitively low. Any number of "real" instances require paid subcription that far exceeds potential savings for an individual server. As an individual who is using GCP for personal/lab projects a simple scheduler would be fantastic
Steven Edouard commented
There's a 3rd party product called VMPower.io which does this by simply scheduling time slots on a weekly calendar. It also supports utilization based shutdown so your VMs can turn off after low cpu/memory/disk utilization.
It would be great to have a feature to where we can start and end time for an instance. e.g in a day only from 9 am to 6 pm.
Marcos F commented
THIS. I work with a project where I had to setup a VM just for scheduling purposes, This would add great value for us.
Karl Gingerich commented
I am doing this now from a Mac in my office and using Cron and the Cloud API CLI, but built in to the cloud console would be better.