Skip to content

fix(scheduler): run-now id lookup + heartbeat status badge - #81

Merged
kalinon merged 1 commit into
mainfrom
fix/scheduler-run-and-heartbeat-status
Apr 13, 2026
Merged

fix(scheduler): run-now id lookup + heartbeat status badge#81
kalinon merged 1 commit into
mainfrom
fix/scheduler-run-and-heartbeat-status

Conversation

@moltar-bot

Copy link
Copy Markdown
Contributor

Summary

Fixes two scheduler bugs reported in production:

  1. Run now could fail with Cron job not found: <id>
  2. Hourly heartbeat jobs could show a misleading not scheduled badge

Changes

API (cronJobsService)

  • Added resolveJobEntry(jobs, identifier) to resolve jobs by either map key, jobId, or id.
  • Updated triggerCronJob(jobId) fallback path to use resolved entry instead of direct map key lookup.
  • Added WS-RPC attempt for cron.run before file fallback.

UI (CronJobs + CronJobList)

  • Updated status badge logic so not scheduled is not applied to heartbeat/config jobs just because next/last timestamps are missing.
  • Heartbeats now show enabled/disabled/error/off-hours states appropriately.

Validation

  • npm run -w ./web lint
  • npm run -w ./api test:run -- cronJobService.test.js

Fixes #79
Fixes #80

@kalinon
kalinon merged commit 7df749e into main Apr 13, 2026
9 checks passed
@kalinon
kalinon deleted the fix/scheduler-run-and-heartbeat-status branch April 13, 2026 15:31
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.

bug(scheduler): Heartbeat jobs show 'not scheduled' despite active hourly schedule bug(scheduler): Run Now can fail with 'Cron job not found: <id>'

2 participants