CostLensVM Off-Hours Schedule (Azure)

VM Off-Hours Schedule (Azure)

CostLens flags dev/test Azure VMs running 24×7 that could be scheduled to business hours, saving ~65% of their compute cost.

Updated July 20261 min read

CostLens flags schedulable dev/test Azure VMs — instances tagged or named for a non-production environment that run 24×7. Non-production VMs rarely need to run nights and weekends; an off-hours schedule typically saves ~65% of their compute cost with no impact on the workday.

Reversible by design

Scheduling only changes when a VM runs — the VM and its data are untouched. Remove or adjust the schedule at any time.

How it works

VMs are enumerated

CostLens lists VMs via the Azure Resource Manager API and reads each VM's tags and name.

Schedulable VMs are identified

A VM is flagged when an environment/env tag (or its name) indicates dev, test, staging, QA, UAT, or sandbox.

Savings are estimated

Priced from the VM size × the fraction of hours saved by running only business hours (~65%).

What to do

  1. Confirm the VM genuinely doesn't need to run 24×7 (no overnight jobs, no shared use across time zones).
  2. Apply an Auto-shutdown schedule (VM → Operations → Auto-shutdown) or an automation runbook / Microsoft.DevTestLab schedule to start and stop it on a business-hours cadence.

Severity levels

SeverityEstimated monthly savings
critical>$500
high$100–$500
medium$20–$100
low<$20

Required permissions

Limitations

  • Detection is heuristic (tag/name based) — a production VM mislabelled as "test" could be flagged; review before scheduling.
  • The estimate assumes the VM currently runs 24×7; a VM already scheduled will show less real saving.
  • This check is advisory — scheduling is configured in Azure. See also Idle Virtual Machine for VMs that are idle rather than schedulable.
CostLens
Previous
VM Right-sizing
CostLens
Next
Over-Provisioned Scale Set