feat(cron): add configurable execution timeout for cron jobs#225
Merged
yinwm merged 4 commits intosipeed:mainfrom Feb 17, 2026
Merged
feat(cron): add configurable execution timeout for cron jobs#225yinwm merged 4 commits intosipeed:mainfrom
yinwm merged 4 commits intosipeed:mainfrom
Conversation
Add a new configuration option `exec_timeout_minutes` under the `tools.cron` section to control the maximum execution time for cron jobs. The default timeout is set to 5 minutes, which is appropriate for LLM operations. The configuration can be set in the config file or via the `PICOCLAW_TOOLS_CRON_EXEC_TIMEOUT_MINUTES` environment variable. A value of 0 disables the timeout entirely. This change improves system reliability by preventing cron jobs from running indefinitely in case of unexpected failures or hanging processes.
Collaborator
|
@Zepan Adds configurable execution timeout for cron jobs — prevents a stuck job from blocking the cron service forever. Important for reliability on long-running deployments. Recommendation: Merge. +36/-6, small but important resilience improvement. |
Replace unconditional WithTimeout usage with conditional context creation based on timeout configuration. Zero values now bypass timeout enforcement, using WithCancel for graceful cancellation while preserving existing timeout behavior for positive values. Simplifies CronTool initialization by removing unnecessary conditional timeout assignment.
SebastianBoehler
pushed a commit
to SebastianBoehler/picoclaw
that referenced
this pull request
Feb 22, 2026
feat(cron): add configurable execution timeout for cron jobs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
exec_timeout_minutesconfig option undertools.cronsection0to disable timeout entirelyPICOCLAW_TOOLS_CRON_EXEC_TIMEOUT_MINUTESenv varProblem
Cron jobs executing LLM operations were timing out at the hardcoded 60-second limit, causing errors like:
Solution
Make the timeout configurable with a sensible default for LLM workloads.
Changes
pkg/config/config.go: AddCronToolsConfigstructpkg/tools/cron.go: AcceptexecTimeoutparameter inNewCronToolcmd/picoclaw/main.go: Pass config value to cron toolconfig/config.example.json: Add cron config exampleREADME.md,README.zh.md,README.ja.md: Update config examplesTest plan
make buildsucceedsgo test ./pkg/config/... ./pkg/tools/...passes🤖 Generated with Claude Code