Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Instance schedule cron format not working properly

Hello,

 

I have scheduled my instance to stop and start only on weekday using cron format. But still my instance is starting and stopping during weekend. Please advise how i can resolve this.

Below is the format i used.

VM Start45 3 1-31 * 1-5
VM Stop45 15 1-31 * 1-5
0 1 330
1 REPLY 1

Hi @prasadgcp,

Welcome to Google Cloud Community!

Based on the cron job format you provided the instance scheduler is set to start at 3:45 AM, monday to friday and instance to stop at 3:45 PM of monday to friday.

You can try to use  this instead:

VM Start 45 3 * * 1-5
VM Stop  45 15 * * 1-5

Or you can just set your instance to stop every sat and sun then start every monday to friday, see below:

VM Start 0 0 * * 1-5
VM Stop  0 0 * * 6-7

The default time-zone is ETC/UTC, you can check this document for further info.

And here is the documentation on Scheduling a VM instance to start and stop.

Top Labels in this Space
Top Solution Authors