{"record":{"id":"2b578cc3ffc1f94e","repo":"mastra-ai/mastra","slug":"validatecron-is-not-available-in-this-version-of","errorCode":null,"errorMessage":"`validateCron` is not available in this version of @mastra/core. Schedules require @mastra/core >= 1.32.0.","messagePattern":"`validateCron` is not available in this version of @mastra/core\\. Schedules require @mastra/core >= 1\\.32\\.0\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/server/src/server/handlers/schedules-workflows-shim.ts","lineNumber":38,"sourceCode":"\nimport * as coreWorkflows from '@mastra/core/workflows';\n\nconst exportedNext = (coreWorkflows as Record<string, unknown>).computeNextFireAt;\nconst exportedValidate = (coreWorkflows as Record<string, unknown>).validateCron;\n\nexport const computeNextFireAt: any =\n  exportedNext ??\n  (() => {\n    throw new Error(\n      '`computeNextFireAt` is not available in this version of @mastra/core. ' +\n        'Schedules require @mastra/core >= 1.32.0.',\n    );\n  });\n\nexport const validateCron: any =\n  exportedValidate ??\n  (() => {\n    throw new Error(\n      '`validateCron` is not available in this version of @mastra/core. ' + 'Schedules require @mastra/core >= 1.32.0.',\n    );\n  });\n","sourceCodeStart":20,"sourceCodeEnd":42,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/server/src/server/handlers/schedules-workflows-shim.ts#L20-L42","documentation":"Same shim pattern as computeNextFireAt: validateCron is re-exported from @mastra/core and replaced with a throwing stub when the installed core (< 1.32.0) does not export it. Creating or validating a schedule then fails with this error.","triggerScenarios":"POST to create/update a schedule (which validates body.cron) while @mastra/core < 1.32.0 is installed, or the export is absent in the resolved version.","commonSituations":"Outdated or mismatched @mastra/core in the workspace; server upgraded to schedules support without upgrading core; stale node_modules after a version bump.","solutions":["Upgrade @mastra/core to >= 1.32.0.","Run a clean install (rm lockfile entries / pnpm install) to remove stale core copies.","Check for duplicate @mastra/core versions in the tree (pnpm why @mastra/core) and dedupe."],"exampleFix":"// before\npnpm add @mastra/server@latest  # core left at 1.31.0\n// after\npnpm add @mastra/server@latest @mastra/core@latest","handlingStrategy":"fallback","validationCode":"import * as core from '@mastra/core';\nif (typeof (core as any).validateCron !== 'function') {\n  throw new Error('@mastra/core >= 1.32.0 is required for cron validation');\n}","typeGuard":null,"tryCatchPattern":"try {\n  await client.createSchedule({ workflowId, cron });\n} catch (e) {\n  if (/validateCron/.test(String(e?.message))) {\n    throw new Error('Upgrade @mastra/core to >= 1.32.0 to use schedules');\n  }\n  throw e;\n}","preventionTips":["Validate cron expressions client-side with a well-known parser before sending.","Keep @mastra/core and @mastra/server versions in lockstep.","Do a clean install after bumping mastra packages."],"tags":["version-mismatch","schedules","cron","dependency"],"backgroundTag":"missing-core-export","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}