forked from robfig/cron
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestobservabilityMetrics and monitoringMetrics and monitoring
Description
Description
Production deployments need a way to check scheduler health for load balancers and monitoring.
Current Limitation
No built-in way to check if scheduler is healthy:
c := cron.New()
c.Start()
// No c.IsHealthy() or similarProposed API
type SchedulerHealth struct {
Running bool
EntryCount int
LastJobStart time.Time
LastJobComplete time.Time
RunningJobCount int
OpenCircuits []EntryID
ErrorRate float64 // Last 5 minutes
}
// Health check method
health := c.Health()
if !health.Running || health.ErrorRate > 0.5 {
return errors.New("scheduler unhealthy")
}
// HTTP handler helper
http.HandleFunc("/health/cron", func(w http.ResponseWriter, r *http.Request) {
health := c.Health()
json.NewEncoder(w).Encode(health)
})Use Cases
- Kubernetes liveness/readiness probes
- Load balancer health checks
- Monitoring dashboards
- Alerting systems
Severity
🟡 Medium - Production operations requirement
Found By
Pre-1.0 release code review with Zen/Gemini
CybotTM
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestobservabilityMetrics and monitoringMetrics and monitoring