Skip to content

cron: add CLI support for command payload jobs#64598

Closed
rocdesu wants to merge 2 commits into
openclaw:mainfrom
rocdesu:feat/cron-command-payload-cli
Closed

cron: add CLI support for command payload jobs#64598
rocdesu wants to merge 2 commits into
openclaw:mainfrom
rocdesu:feat/cron-command-payload-cli

Conversation

@rocdesu

@rocdesu rocdesu commented Apr 11, 2026

Copy link
Copy Markdown

Summary

This adds the CLI component to support payload.kind="command" cron jobs (stacked on top of #62789).

  • add cron add CLI support for payload.kind="command"
  • add cron edit support for updating command payload jobs
  • add CLI coverage for command payload create/edit flows

Example

openclaw cron add \
  --name "echo test" \
  --every 5m \
  --command echo \
  --arg hello

@rocdesu
rocdesu requested review from a team as code owners April 11, 2026 02:26
@greptile-apps

greptile-apps Bot commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

Too many files changed for review. (3000 files found, 100 file limit)

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: bluebubbles Channel integration: bluebubbles channel: discord Channel integration: discord channel: googlechat Channel integration: googlechat channel: imessage Channel integration: imessage channel: line Channel integration: line channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: msteams Channel integration: msteams channel: nextcloud-talk Channel integration: nextcloud-talk channel: nostr Channel integration: nostr channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: tlon Channel integration: tlon channel: voice-call Channel integration: voice-call channel: whatsapp-web Channel integration: whatsapp-web channel: zalo Channel integration: zalo channel: zalouser Channel integration: zalouser app: android App: android app: ios App: ios app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime extensions: copilot-proxy Extension: copilot-proxy extensions: diagnostics-otel Extension: diagnostics-otel extensions: llm-task Extension: llm-task labels Apr 11, 2026
@openclaw-barnacle

Copy link
Copy Markdown

Closing this PR because it looks dirty (too many unrelated or unexpected changes). This usually happens when a branch picks up unrelated commits or a merge went sideways. Please recreate the PR from a clean branch.

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

💡 Codex Review

https://github.com/openclaw/openclaw/blob/a949adc9cfddf82e9055f3ddd63ba2047e5c2ac3/src/gateway/server-cron.ts#L498-L499
P1 Badge Generate per-run ids for command delivery dispatch

This hard-codes runSessionId/agentSessionKey to cron-command:${job.id}, so every run of the same command job reuses the same delivery identity. In dispatchCronDelivery, the direct-delivery idempotency key is derived from runSessionId, and successful sends are cached; with a stable id this causes later runs (same target/channel/thread) to be treated as duplicates and skipped while still appearing delivered. Recurring command jobs can therefore stop posting announcements after the first successful run.


https://github.com/openclaw/openclaw/blob/a949adc9cfddf82e9055f3ddd63ba2047e5c2ac3/src/gateway/server-cron.ts#L285-L288
P1 Badge Escalate timed-out command termination beyond SIGTERM

Timeout handling only calls child.kill("SIGTERM") and then waits for process exit, with no escalation path. If the command ignores/traps SIGTERM (or leaves child processes alive), cron marks the run as timed out but the spawned process can continue running indefinitely, causing resource leaks and repeated orphaned work on recurring jobs.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: android App: android app: ios App: ios app: macos App: macos app: web-ui App: web-ui channel: bluebubbles Channel integration: bluebubbles channel: discord Channel integration: discord channel: feishu Channel integration: feishu channel: googlechat Channel integration: googlechat channel: imessage Channel integration: imessage channel: irc channel: line Channel integration: line channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: msteams Channel integration: msteams channel: nextcloud-talk Channel integration: nextcloud-talk channel: nostr Channel integration: nostr channel: qa-channel Channel integration: qa-channel channel: qqbot channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: tlon Channel integration: tlon channel: twitch Channel integration: twitch channel: voice-call Channel integration: voice-call channel: whatsapp-web Channel integration: whatsapp-web channel: zalo Channel integration: zalo channel: zalouser Channel integration: zalouser cli CLI command changes commands Command implementations docker Docker and sandbox tooling docs Improvements or additions to documentation extensions: acpx extensions: anthropic extensions: arcee extensions: byteplus extensions: cloudflare-ai-gateway extensions: codex extensions: copilot-proxy Extension: copilot-proxy extensions: deepseek extensions: device-pair extensions: diagnostics-otel Extension: diagnostics-otel extensions: duckduckgo extensions: fal extensions: huggingface extensions: kilocode extensions: kimi-coding extensions: llm-task Extension: llm-task extensions: lobster Extension: lobster extensions: memory-core Extension: memory-core extensions: memory-lancedb Extension: memory-lancedb extensions: memory-wiki extensions: minimax extensions: moonshot extensions: nvidia extensions: open-prose Extension: open-prose extensions: openai extensions: phone-control extensions: qa-lab extensions: qianfan extensions: stepfun extensions: synthetic extensions: talk-voice extensions: tavily extensions: together extensions: venice extensions: vercel-ai-gateway extensions: volcengine extensions: webhooks extensions: xiaomi gateway Gateway runtime scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant