chenhg5/cc-connect · error
timer scheduler not available
Error message
timer scheduler not available
What it means
handleTimerDel requires timer scheduler support; if s.timer is nil (timer feature not configured or not wired at startup) it returns 503. The deletion endpoint cannot function without a backing scheduler.
Source
Thrown at core/api.go:734
return
}
job := s.timer.Store().Get(id)
if job == nil {
http.Error(w, "timer not found", http.StatusNotFound)
return
}
apiJSON(w, http.StatusOK, job)
}
func (s *APIServer) handleTimerDel(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodPost {
http.Error(w, "POST only", http.StatusMethodNotAllowed)
return
}
if s.timer == nil {
http.Error(w, "timer scheduler not available", http.StatusServiceUnavailable)
return
}
var req struct {
ID string `json:"id"`
}
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
http.Error(w, "invalid JSON: "+err.Error(), http.StatusBadRequest)
return
}
if req.ID == "" {
http.Error(w, "id is required", http.StatusBadRequest)
return
}
if !s.timer.RemoveJob(req.ID) {
http.Error(w, "timer not found", http.StatusNotFound)
returnView on GitHub (pinned to 4000b2338a)
Solutions
- Enable/configure the timer scheduler in config.toml and restart
- Check server startup logs for timer initialization errors
- Skip timer API calls in clients when the timer feature is disabled, or feature-detect via a status/health endpoint
Example fix
// config.toml before # (no [timer] section) // after [timer] enabled = true
Defensive patterns
Strategy: fallback
Validate before calling
const health = await (await fetch('/api/health')).json();
if (!health.timerEnabled) console.warn('timer feature disabled; skipping timer API'); Try / catch
try { await delTimer(id); } catch (e) { if (e.status === 503) { disableTimerUI(); return; } throw e; } Prevention
- Verify the [timer] section is present and enabled in config.toml before shipping deployments that use timers
- Feature-detect timer availability at client startup
- Check server startup logs for scheduler init failures
When it happens
Trigger: POST to timer-delete when the APIServer was constructed without a timer scheduler (timer feature disabled in config or not initialized).
Common situations: Deployments running without the timer subsystem; config.toml missing the timer section; older builds where the scheduler was optional.
Related errors
- timer not found
- relay not available
- platform %q does not support proactive messaging (timer)
- resolve timer reply target: %w
- session_key is required
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/19c9fe810358df54.
Report an issue: GitHub.