Skip to content

cron_create — schedule a recurring job

cron_create saves a recurring job (name + cron expression + command) to the per-user store. On macOS, pass register: true to also drop a launchd plist into ~/Library/LaunchAgents/. The store is plain JSON so it’s editable by hand and survives Chimera upgrades.

ArgTypeRequiredDefaultDescription
namestringyesUnique job name.
schedulestringyes5-field cron expression (min hour dom mon dow).
commandstringyesShell command to run.
envobjectno{}Optional env vars (string-keyed string values).
registerbooleannofalseIf true on macOS, register via launchctl.
{
"name": "daily-sync",
"schedule": "0 9 * * *",
"command": "uv run python scripts/sync.py",
"env": {"PYTHONPATH": "/Users/me/dev/chimera"},
"register": true
}
from chimera.tools.cron_tools import CronCreateTool
tool = CronCreateTool()
result = tool.execute(
{"name": "nightly-bench",
"schedule": "0 2 * * *",
"command": "uv run python examples/benchmarks/humaneval_full.py"},
env=local_env,
)
Created job 'daily-sync' (0 9 * * *).
Registered with launchctl as com.chimera.cron.daily-sync.
MessageCause
Job '<name>' already existsPick a different name or delete the existing job.
Invalid cron expression: ...The schedule didn’t parse.
launchctl not available on this platformregister: true was set on Linux / Windows.