Skip to content

fix(sqlite): reset stale 'running' cron jobs on startup#797

Open
Luvu182 wants to merge 1 commit intonextlevelbuilder:mainfrom
Luvu182:fix/sqlite-interrupted-reset
Open

fix(sqlite): reset stale 'running' cron jobs on startup#797
Luvu182 wants to merge 1 commit intonextlevelbuilder:mainfrom
Luvu182:fix/sqlite-interrupted-reset

Conversation

@Luvu182
Copy link
Copy Markdown
Contributor

@Luvu182 Luvu182 commented Apr 9, 2026

Summary

  • PG recomputeStaleJobs already resets jobs stuck in last_status = 'running' to 'interrupted' on startup, but the SQLite implementation was missing this step
  • Desktop app crashes leave cron jobs permanently stuck in running status, preventing them from ever executing again

One-line fix — mirrors the existing PG behavior exactly.

Test plan

  • Crash desktop app while a cron job is running → restart → verify job shows interrupted (not stuck running)
  • Normal startup with no stale jobs — no change in behavior

🤖 Generated with Claude Code

PG version already resets jobs stuck in 'running' state on startup
(from a crash mid-execution), but SQLite was missing this step.
Desktop app crashes would leave cron jobs permanently stuck in
'running' status, never executing again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant