惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
爱范儿
爱范儿
WordPress大学
WordPress大学
博客园 - 三生石上(FineUI控件)
J
Java Code Geeks
Vercel News
Vercel News
aimingoo的专栏
aimingoo的专栏
T
Tailwind CSS Blog
罗磊的独立博客
B
Blog
博客园_首页
A
About on SuperTechFans
有赞技术团队
有赞技术团队
V
V2EX
U
Unit 42
I
InfoQ
IT之家
IT之家
博客园 - 司徒正美
阮一峰的网络日志
阮一峰的网络日志
博客园 - 叶小钗
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog
The Cloudflare Blog
H
Help Net Security

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
docs: document cron schedule helpers · openclaw/openclaw@...
steipete · 2026-06-05 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

/** Builds stable identities for cron scheduling inputs. */

12

import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce";

23

import { coerceFiniteScheduleNumber } from "./schedule-number.js";

34

import { normalizeCronStaggerMs } from "./stagger.js";

@@ -34,6 +35,8 @@ function schedulePayloadFromRecord(

3435

const tz = readString(schedule, "tz");

3536

const staggerMs = readStaggerMs(schedule);

3637

const kind =

38+

// Infer legacy shorthand schedule shapes when kind is missing so timer

39+

// identity remains stable across old persisted jobs and normalized jobs.

3740

rawKind === "at" || rawKind === "every" || rawKind === "cron"

3841

? rawKind

3942

: at

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

/** Coerces cron schedule number fields with strict finite-number parsing. */

12

import { parseStrictFiniteNumber } from "@openclaw/normalization-core/number-coercion";

23
34

/** Coerces schedule numeric fields without accepting partial or non-finite numbers. */

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

/** Computes at/every/cron schedule timestamps with bounded Croner caching. */

12

import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce";

23

import { Cron } from "croner";

34

import { parseAbsoluteTimeMs } from "./parse.js";

@@ -27,6 +28,8 @@ function resolveCachedCron(expr: string, timezone: string): Cron {

2728

return cached;

2829

}

2930

if (cronEvalCache.size >= CRON_EVAL_CACHE_MAX) {

31+

// Expression parsing is expensive enough to cache, but cron jobs can be

32+

// edited dynamically; keep the cache bounded and LRU-like.

3033

const oldest = cronEvalCache.keys().next().value;

3134

if (oldest) {

3235

cronEvalCache.delete(oldest);

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

/** Timeout watchdogs for isolated cron agent setup and execution phases. */

12

import type {

23

CronAgentExecutionPhase,

34

CronAgentExecutionPhaseUpdate,

@@ -111,6 +112,8 @@ export function createCronAgentWatchdog(params: {

111112

const previousPhase = activeExecution?.phase;

112113

activeExecution = { ...activeExecution, ...info };

113114

const stage = info.phase ? CRON_AGENT_PHASE_WATCHDOG_STAGE[info.phase] : undefined;

115+

// A fallback attempt can return to setup-like phases after execution began;

116+

// re-arm pre-execution timing so the fallback path cannot stall silently.

114117

if (

115118

state === "executing" &&

116119

previousPhase === "before_agent_reply" &&

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

/** Formats stable cron timeout and execution error messages. */

12

import { formatEmbeddedAgentExecutionPhase } from "../../agents/embedded-agent-runner/execution-phase.js";

23

import type { CronAgentExecutionStarted } from "../types.js";

34
Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

/** Resolves and emits cron failure-alert notifications. */

12

import { normalizeOptionalLowercaseString } from "@openclaw/normalization-core/string-coerce";

23

import { resolveFailoverReasonFromError } from "../../agents/failover-error.js";

34

import type { CronFailureNotificationDelivery, CronJob, CronMessageChannel } from "../types.js";

@@ -78,6 +79,8 @@ export function resolveFailureAlert(

7879

const mode = jobConfig?.mode ?? globalConfig?.mode;

7980

const explicitTo = normalizeTo(jobConfig?.to);

8081
82+

// Announce alerts inherit the job delivery target; webhook alerts require an

83+

// explicit alert target so chat recipients are not reused as URLs.

8184

return {

8285

after: clampPositiveInt(jobConfig?.after ?? globalConfig?.after, DEFAULT_FAILURE_ALERT_AFTER),

8386

cooldownMs: clampNonNegativeInt(

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

/** Resolves create-time default delivery for new cron jobs. */

12

import type { CronDelivery, CronJobCreate } from "../types.js";

23
34

/** Resolves default cron delivery for new jobs when callers omit explicit delivery config. */

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

/** Cron job scheduling, validation, creation, and patch helpers. */

12

import crypto from "node:crypto";

23

import {

34

normalizeOptionalString,

@@ -343,6 +344,7 @@ function assertDeliverySupport(job: Pick<CronJob, "sessionTarget" | "delivery">)

343344

return;

344345

}

345346

if (job.delivery.mode === "webhook") {

347+

// Webhook delivery is standalone and does not need an isolated chat target.

346348

return;

347349

}

348350

const isIsolatedLike =

@@ -844,6 +846,8 @@ export function applyJobPatch(

844846

);

845847

}

846848

if (job.sessionTarget === "main" && job.delivery?.mode !== "webhook") {

849+

// Main-session jobs cannot auto-announce; keep only an empty failure

850+

// destination object when the patch is clearing nested fields.

847851

const failureDestination = job.delivery?.failureDestination;

848852

job.delivery =

849853

failureDestination && !hasConcreteFailureDestination(failureDestination)