VM Off-Hours Schedule (GCP)
CostLens flags dev/test Compute Engine VMs running 24×7 that could be scheduled to business hours, saving ~65% of their compute cost.
CostLens flags schedulable dev/test Compute Engine VMs — running instances labelled or named for a non-production environment. Non-production VMs rarely need to run nights and weekends; an instance schedule that stops them off-hours typically saves ~65% of their compute cost.
Reversible by design
Scheduling only changes when a VM runs — the instance and its disks are untouched. Adjust or remove the schedule at any time.
How it works
Instances are enumerated
CostLens lists running instances across zones via the Compute aggregated API and reads each one's labels and name.
Schedulable VMs are identified
A VM is flagged when an environment/env label (or its name) indicates dev, test, staging, QA, UAT, or sandbox.
Savings are estimated
Priced from the machine type × the fraction of hours saved by running only business hours (~65%).
What to do
- Confirm the VM genuinely doesn't need to run 24×7 (no overnight jobs, no cross-time-zone use).
- Attach a resource policy instance schedule (Compute Engine → VM instances → Instance schedules) to start and stop it on a business-hours cadence.
Severity levels
| Severity | Estimated monthly savings |
|---|---|
| critical | >$500 |
| high | $100–$500 |
| medium | $20–$100 |
| low | <$20 |
Required permissions
- Detect: Compute read (
roles/compute.vieweror the read scope) — see GCP Accounts.
Limitations
- Detection is heuristic (label/name based) — review before scheduling.
- The estimate assumes the VM currently runs 24×7; one already on a schedule will show less real saving.
- See also Idle VM Instance for VMs that are idle rather than schedulable.