fix(cron): migrate legacy schedule cron fields on load#28889
Merged
Takhoffman merged 1 commit intoopenclaw:mainfrom Mar 1, 2026
Merged
fix(cron): migrate legacy schedule cron fields on load#28889Takhoffman merged 1 commit intoopenclaw:mainfrom
Takhoffman merged 1 commit intoopenclaw:mainfrom
Conversation
Backfill legacy jobs that still use schedule.cron and jobId so upgraded instances keep firing existing cron schedules instead of failing silently. Closes openclaw#28861
Contributor
Greptile SummaryThis PR adds automatic migration for legacy cron job fields to prevent silent failures after upgrades:
The implementation is thorough and defensive:
Confidence Score: 5/5
Last reviewed commit: 87ccc36 |
This was referenced Mar 1, 2026
hwb96
pushed a commit
to hwb96/openclaw
that referenced
this pull request
Mar 1, 2026
Backfill legacy jobs that still use schedule.cron and jobId so upgraded instances keep firing existing cron schedules instead of failing silently. Closes openclaw#28861
zooqueen
added a commit
to hanzoai/bot
that referenced
this pull request
Mar 1, 2026
Cherry-pick from upstream openclaw/openclaw 504c1f3. Migrates legacy schedule.cron → schedule.expr, jobId → id, and defaults wakeMode to "now" when missing from old store files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ansh
pushed a commit
to vibecode/openclaw
that referenced
this pull request
Mar 2, 2026
Backfill legacy jobs that still use schedule.cron and jobId so upgraded instances keep firing existing cron schedules instead of failing silently. Closes openclaw#28861
steipete
pushed a commit
to Sid-Qin/openclaw
that referenced
this pull request
Mar 2, 2026
Backfill legacy jobs that still use schedule.cron and jobId so upgraded instances keep firing existing cron schedules instead of failing silently. Closes openclaw#28861
safzanpirani
pushed a commit
to safzanpirani/clawdbot
that referenced
this pull request
Mar 2, 2026
Backfill legacy jobs that still use schedule.cron and jobId so upgraded instances keep firing existing cron schedules instead of failing silently. Closes openclaw#28861
steipete
pushed a commit
to Sid-Qin/openclaw
that referenced
this pull request
Mar 2, 2026
Backfill legacy jobs that still use schedule.cron and jobId so upgraded instances keep firing existing cron schedules instead of failing silently. Closes openclaw#28861
robertchang-ga
pushed a commit
to robertchang-ga/openclaw
that referenced
this pull request
Mar 2, 2026
Backfill legacy jobs that still use schedule.cron and jobId so upgraded instances keep firing existing cron schedules instead of failing silently. Closes openclaw#28861
hanqizheng
pushed a commit
to hanqizheng/openclaw
that referenced
this pull request
Mar 2, 2026
Backfill legacy jobs that still use schedule.cron and jobId so upgraded instances keep firing existing cron schedules instead of failing silently. Closes openclaw#28861
execute008
pushed a commit
to execute008/openclaw
that referenced
this pull request
Mar 2, 2026
Backfill legacy jobs that still use schedule.cron and jobId so upgraded instances keep firing existing cron schedules instead of failing silently. Closes openclaw#28861
dorgonman
pushed a commit
to kanohorizonia/openclaw
that referenced
this pull request
Mar 3, 2026
Backfill legacy jobs that still use schedule.cron and jobId so upgraded instances keep firing existing cron schedules instead of failing silently. Closes openclaw#28861
sachinkundu
pushed a commit
to sachinkundu/openclaw
that referenced
this pull request
Mar 6, 2026
Backfill legacy jobs that still use schedule.cron and jobId so upgraded instances keep firing existing cron schedules instead of failing silently. Closes openclaw#28861
zooqueen
added a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
Cherry-pick from upstream openclaw/openclaw 504c1f3. Migrates legacy schedule.cron → schedule.expr, jobId → id, and defaults wakeMode to "now" when missing from old store files.
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
Backfill legacy jobs that still use schedule.cron and jobId so upgraded instances keep firing existing cron schedules instead of failing silently. Closes openclaw#28861
Mateljan1
pushed a commit
to Mateljan1/openclaw
that referenced
this pull request
Mar 7, 2026
Backfill legacy jobs that still use schedule.cron and jobId so upgraded instances keep firing existing cron schedules instead of failing silently. Closes openclaw#28861
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
schedule.cronandjobId, while current runtime expectsschedule.exprandid, causing schedule evaluation errors and silent non-firing jobs.src/cron/service/store.tsforjobId -> id,schedule.cron -> schedule.expr, and canonicalwakeMode; added defensive fallback for legacycronfield insrc/cron/schedule.ts; normalized legacyschedule.croninsrc/cron/normalize.ts; added regression tests.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
schedule.cronnow migrate automatically and continue running.jobIdnow normalize toidduring load.wakeModeon legacy records defaults tonowduring migration.Security Impact (required)
NoNoNoNoNoRepro + Verification
Environment
Steps
jobs.jsonentry withschedule: { kind: "cron", cron: "*/5 * * * *" }andjobIdinstead ofid.Expected
id,schedule.expr) and keeps scheduling.Actual
expr, and legacy fields were not normalized.Evidence
src/cron/service.store-migration.test.tssrc/cron/schedule.test.tssrc/cron/normalize.test.tspnpm --dir /Users/sidqin/Desktop/openclaw-contrib exec vitest src/cron/service.store-migration.test.ts src/cron/schedule.test.ts src/cron/normalize.test.tsHuman Verification (required)
schedule.cronmigrates toschedule.expr.jobIdmigrates to canonicalid.exprremains preferred.wakeModeis normalized consistently.Compatibility / Migration
YesNoNo(automatic load-time migration)Failure Recovery (if this breaks)
src/cron/service/store.ts,src/cron/schedule.ts,src/cron/normalize.ts.Risks and Mitigations