tabs ↹ over ␣ ␣ ␣ spaces

by Jiří {x2} Činčura

Shutting down VMs in Azure automatically based on schedule

24 Apr 2017 1 mins Azure, Cloud

Azure VMs are great for developers for testing stuff, not only running servers. Then often you don’t need the VM all the time. You can shut it down i.e. during the night and save some money. The only problem is to remember to do it. Especially if the VM is used in a team etc. Luckily Azure portal has a less-known feature, as I’ve found last Friday when chatting with a friend, to help you with it.

If you go to the VM’s blade, then on the left side you can find “Auto-shutdown”.

Auto-shutdown

Clicking on that allows you to specify time when the VM should the turned off (with optional time zone). How convenient is that?

Auto-shutdown

You can also specify webhook that the infrastructure will call 15 minutes before the action happens.

Although you can do the same with simple script and Scheduled Tasks or cron, this is very easy way with literally no barrier to do it.

Profile Picture Jiří Činčura is .NET, C# and Firebird expert. He focuses on data and business layers, language constructs, parallelism, databases and performance. For almost two decades he contributes to open-source, i.e. FirebirdClient. He works as a senior software engineer for Microsoft. Frequent speaker and blogger at www.tabsoverspaces.com.