openclaw - 💡(How to fix) Fix Cron main-session jobs timeout when execution exceeds ~10 minutes [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#70325Fetched 2026-04-23 07:26:15
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0

Error Message

  • But the cron wrapper reports "error" with "lastError": "cron: job execution timed out" "lastRunStatus": "error",

Code Example

{
  "lastRunAtMs": 1776819600011,
  "lastRunStatus": "error",
  "lastDurationMs": 600906,
  "lastError": "cron: job execution timed out"
}
RAW_BUFFERClick to expand / collapse

Current Behavior

A cron job scheduled to run nightly at 03:00 executes a memory-core promotion process. The process:

  • Legitimately takes ~10 minutes to search memory files, calculate recall weights, and write outputs
  • Completes successfully (all output files are written)
  • But the cron wrapper reports "error" with "lastError": "cron: job execution timed out"

The work gets done, but the cron status is misleading.

Expected Behavior

Long-running main-session cron jobs should either:

  • Complete without timeout errors, OR
  • Have a configurable timeout, OR
  • Document the hardcoded timeout limit so users know what to expect

Actual Behavior

{
  "lastRunAtMs": 1776819600011,
  "lastRunStatus": "error",
  "lastDurationMs": 600906,
  "lastError": "cron: job execution timed out"
}

Note: 600906ms ≈ 10 minutes. The actual work completed successfully during this time.

Suggestion

Either:

  1. Increase timeout for main-session jobs, or make it configurable
  2. Document the hardcoded ~10 minute timeout in the cron docs
  3. Add a "long-running" flag or separate cron type for jobs expected to exceed the default timeout

Environment

  • OpenClaw version: 2026.4.12
  • Cron target: main session
  • Job type: systemEvent with custom text payload
  • Task: memory-core dreaming promotion (searches memory files, calculates recall weights, writes light/REM/deep outputs)

extent analysis

TL;DR

Increase the timeout for main-session cron jobs or make it configurable to prevent misleading "error" reports for long-running tasks.

Guidance

  • Verify the current timeout limit by checking the cron documentation or configuration files to understand the existing timeout value.
  • Consider adding a "long-running" flag or separate cron type for jobs expected to exceed the default timeout to improve cron job management.
  • Evaluate the feasibility of documenting the hardcoded timeout limit in the cron docs to set user expectations and prevent similar issues.
  • Test the cron job with an increased timeout or a configurable timeout setting to ensure it completes without reporting a timeout error.

Example

No code snippet is provided as it is not explicitly supported by the issue, but an example of increasing the timeout could involve modifying the cron job configuration, such as setting a --timeout flag or editing a configuration file with a timeout parameter.

Notes

The solution assumes that the cron job's long execution time is legitimate and expected. If the job's duration is unexpectedly long, further investigation into the job's performance or the system's resources may be necessary.

Recommendation

Apply a workaround by increasing the timeout for main-session cron jobs, as this directly addresses the reported issue and prevents misleading error reports. This approach allows for a quick resolution while a more permanent solution, such as making the timeout configurable, can be explored.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING