Create Cron Job
/install create-cron-job
Create Cron Job
Set up a scheduled task per conventions/cron.md. Read the convention first.
Need a periodic check instead? Consider HEARTBEAT.md — see "Cron vs Heartbeat" in conventions/cron.md.
Before You Start
Determine:
- Which agent handles the job
- Main session (needs conversation context) or isolated (standalone)
- Delivery mode (announce, webhook, none)
Steps
1. Choose the execution mode
| Question | If yes | If no |
|---|---|---|
| Does the task need recent conversation context? | Main session | Isolated |
| Does the agent need its AGENTS.md/SOUL.md? | Isolated (normal) | Isolated + lightContext |
| Is this a one-shot reminder? | --at with --delete-after-run |
Recurring schedule |
2. Choose a job name
Format: \x3Cagent-id>-\x3Cpurpose> in kebab-case.
Examples: auditor-daily-report, archivist-daily-backup, reminder-standup-meeting
3. Choose a schedule
| Pattern | CLI flag | Example |
|---|---|---|
| Cron expression | --cron |
--cron "0 7 * * *" (7 AM daily) |
| Fixed interval | --every |
--every "4h" |
| One-shot (relative) | --at |
--at "20m" |
| One-shot (absolute) | --at |
--at "2026-03-15T09:00:00Z" |
Always set timezone for cron expressions: --tz "America/Los_Angeles"
4. Create the job
Main session (task needs conversational context):
openclaw cron add \
--name "\x3Cagent-id>-\x3Cpurpose>" \
--every "\x3Cinterval>" \
--session main \
--system-event "\x3Cinstruction text>" \
--wake now
Isolated (standalone task):
openclaw cron add \
--name "\x3Cagent-id>-\x3Cpurpose>" \
--cron "\x3Cexpr>" \
--tz "\x3Ctimezone>" \
--session isolated \
--message "\x3Cinstruction text>" \
--agent \x3Cagent-id> \
--announce \
--channel \x3Cchannel> \
--to "\x3Ctarget>"
Isolated + lightweight context (simple, self-contained chore):
openclaw cron add \
--name "\x3Cagent-id>-\x3Cpurpose>" \
--every "\x3Cinterval>" \
--session isolated \
--message "\x3Cself-contained instruction>" \
--light-context \
--announce
One-shot reminder:
openclaw cron add \
--name "reminder-\x3Cpurpose>" \
--at "\x3Ctime>" \
--session isolated \
--message "\x3Creminder text>" \
--announce \
--delete-after-run
5. Bind to an agent
Always use --agent \x3Cagent-id> for agent-specific jobs.
6. Set delivery mode
- Announce (most jobs):
--announce --channel \x3Cch> --to "\x3Ctarget>" - Webhook:
--webhook \x3Curl> - None: omit delivery flags
7. Document in the agent's AGENTS.md
## Scheduled Tasks
| Job | Schedule | Message | Action |
|---|---|---|---|
| `\x3Cjob-name>` | `\x3Cschedule>` | `\x3Cmessage>` | \x3Cwhat the agent does> |
8. Create a skill if the job uses scripts
If the cron job executes scripts (not just a self-contained message), create a skill using the create-skill skill:
- Scripts live in
workspace/skills/\x3Cskill-name>/scripts/, not in ad-hoc workspace directories - The skill makes the capability discoverable for on-demand use, not just cron
- Description should cover both automated (cron) and on-demand (user request) triggers
- See "Workspace File Placement" in
conventions/skills.mdfor where files belong
Skip if the cron job's message is fully self-contained (no external scripts or supporting files).
9. Test the job
openclaw cron run \x3CjobId> # Force immediate execution
openclaw cron list # Verify job exists
openclaw cron runs --id \x3CjobId> # Check run history
Post-Creation Checklist
- Job name follows
\x3Cagent-id>-\x3Cpurpose>kebab-case convention - Timezone set for cron expressions (
--tz) - Explicit
--agentbinding for agent-specific jobs - Delivery mode set (announce/webhook/none)
- Channel and target specified for announce delivery
- Agent's AGENTS.md updated with Scheduled Tasks entry
- Job tested with
openclaw cron run \x3CjobId> - No duplicate: checked that no system crontab or existing job covers the same task
- One-shot reminders use
--delete-after-run - If job uses scripts: skill created in
workspace/skills/\x3Cname>/with scripts in itsscripts/subdir - No ad-hoc files or directories created at workspace root (see
conventions/skills.md)
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install create-cron-job - After installation, invoke the skill by name or use
/create-cron-job - Provide required inputs per the skill's parameter spec and get structured output
What is Create Cron Job?
Create and configure OpenClaw cron jobs with correct scheduling, execution modes, and delivery patterns. Use when asked to schedule a task, set up a recurrin... It is an AI Agent Skill for Claude Code / OpenClaw, with 241 downloads so far.
How do I install Create Cron Job?
Run "/install create-cron-job" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Create Cron Job free?
Yes, Create Cron Job is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Create Cron Job support?
Create Cron Job is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Create Cron Job?
It is built and maintained by Karl Varga (@kjvarga); the current version is v1.0.0.