mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 07:41:10 +00:00
fix(cron): reject sessionTarget "main" for non-default agents at creation time (openclaw#30217) thanks @liaosvcaf
Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini Co-authored-by: liaosvcaf <51533973+liaosvcaf@users.noreply.github.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This commit is contained in:
@@ -270,7 +270,7 @@ export async function update(state: CronServiceState, id: string, patch: CronJob
|
||||
await ensureLoaded(state, { skipRecompute: true });
|
||||
const job = findJobOrThrow(state, id);
|
||||
const now = state.deps.nowMs();
|
||||
applyJobPatch(job, patch);
|
||||
applyJobPatch(job, patch, { defaultAgentId: state.deps.defaultAgentId });
|
||||
if (job.schedule.kind === "every") {
|
||||
const anchor = job.schedule.anchorMs;
|
||||
if (typeof anchor !== "number" || !Number.isFinite(anchor)) {
|
||||
|
||||
Reference in New Issue
Block a user