#lobster cron
1 messages · Page 1 of 1 (latest)
The clean pattern is:
- Standing orders say what to do
- Cron says when to do it
- Use
--session isolatedfor real jobs,mainfor simple reminders
Example recurring job:
openclaw cron add \
--name "daily-lobster-brief" \
--cron "0 9 * * 1-5" \
--tz "Europe/Vienna" \
--session isolated \
--message "Execute the morning brief per standing orders. Return a short plain-text summary." \
--announce \
--channel discord \
--to "channel:<thread-or-channel-id>"
A few “proper cron” rules:
- use cron for exact timing, use heartbeat if “roughly every 30m” is fine
- add
--tzso it fires when you expect - use
--exactif you really want top-of-hour exactness - keep the cron prompt short, put the durable behavior in
AGENTS.md/ standing orders - for one-shot reminders, use
--at "20m"+--session main+--system-event
If you mean an actual Lobster workflow, same idea: cron is just the scheduler, the isolated agent run can invoke the Lobster pipeline.
Docs:
If you want, I can give you a copy-paste cron for this exact Discord thread.
i want the cron execute .lobster properly
Yep, the important bit is this:
cron does not run .lobster files directly with a --pipeline flag.
The supported pattern is:
- cron schedules an isolated agent turn
- that turn must have the
lobstertool enabled - the prompt tells the agent to run your
.lobsterworkflow file
1) Enable Lobster first
Lobster is optional, not on by default:
{
tools: {
alsoAllow: ["lobster"]
}
}
Docs: https://docs.openclaw.ai/tools/lobster
2) Create the cron as an isolated agent job
openclaw cron add \
--name "run-my-lobster" \
--cron "0 9 * * *" \
--tz "Europe/Vienna" \
--session isolated \
--tools lobster \
--message 'Run the Lobster workflow file "/absolute/path/to/my-flow.lobster". Return a short plain-text summary of the result.' \
--announce \
--channel discord \
--to "channel:<thread-or-channel-id>"
3) A few gotchas
- use an absolute path to the
.lobsterfile if you can - if you use
--tools, make surelobsteris included - for unattended cron, keep the workflow approval-free if possible
because if Lobster pauses withneeds_approval, the cron run won’t finish cleanly on its own
Good mental model
- cron = scheduler
- lobster = workflow runtime
- agent turn = the bridge between them
Cron docs: https://docs.openclaw.ai/automation/cron-jobs
If you want, send me your .lobster path plus when it should run, and I’ll turn it into the exact command.
"kind": "agentTurn"
should i put it too?
Nope, not if you’re using openclaw cron add.
--message + --session isolated already makes it an agentTurn job.
--system-event + --session main becomes systemEvent.
So with the CLI, don’t add "kind": "agentTurn" yourself unless you’re manually writing raw cron JSON / calling the RPC directly, which I wouldn’t recommend here.
So the normal version is just:
openclaw cron add \
--name "run-my-lobster" \
--cron "0 9 * * *" \
--tz "Europe/Vienna" \
--session isolated \
--tools lobster \
--message 'Run "/absolute/path/to/my-flow.lobster" and return a short summary.' \
--announce
If you want, paste your full command and I’ll sanity-check it.
can i put an instruction to use lobster workflow in my agent's heartbeat?
Yes, absolutely.
A heartbeat is just a periodic main-session agent turn, so if lobster is enabled for that agent, the heartbeat can decide to run a .lobster workflow.
A good pattern is:
If the daily triage is due, run the Lobster workflow "/absolute/path/to/triage.lobster" and return a short summary.
If nothing is due, reply HEARTBEAT_OK.
A few caveats:
- keep
HEARTBEAT.mdsmall , just reference the workflow, don’t paste the whole thing there - add a “due” condition or it may run on every heartbeat tick
- if timing must be exact, cron is better
- if the Lobster workflow needs approval, heartbeat has the same unattended problem as cron