Skip to main content

WF-039: Idle Detection & Auto-Stop Flow

Priority: P0 (Critical) | Phase: Phase 1C - Workstation Management | Effort: 14 hours

Workflow Overview

Scheduled workflow (every 30 min) that detects idle workstations (< 5% CPU for 30 min), warns users, and auto-stops after additional 30 min to save costs.

Trigger: Scheduled (every 30 minutes) | Duration: ~2-3 seconds per workstation

Phase 1: Detection & Assessment

Objective: Identify idle workstations through metrics analysis

Automation Steps:

  1. Get all running workstations
  2. Query GCP metrics (CPU utilization, last 30 min)
  3. Calculate idle score (avg CPU < 5% = idle)

Phase 2: User Notification

Objective: Warn users before auto-stop action

Automation Steps: 4. If idle: Send warning email ("Will auto-stop in 30 min") 5. Schedule auto-stop (30 min delay)

Phase 3: Auto-Stop Execution

Objective: Stop idle workstations and track savings

Automation Steps: 6. If still idle after 30 min: Stop workstation 7. Track cost savings (~$0.15/hour saved)

Business Impact

  • Average Savings: $47/month per user (3 hours/day idle)
  • Annual Savings: $564/user (platform-wide: $56K for 100 users)

Testing

  • Idle detection works (< 5% CPU threshold)
  • Warning email sent correctly
  • Auto-stop executes after 30 min
  • User activity prevents auto-stop
  • Cost savings tracked

Status: ✅ Ready for Implementation