#Ai agent tools help

7 messages · Page 1 of 1 (latest)

brazen temple
#

How do I get my agent to create its own cron jobs. Sometimes it works but majority of the time it doesnt

red cedarBOT
#

Let me check the docs and source so I don't make this up.

#

I found the likely culprit. I'm checking whether this is a permissions issue, a model/tool-calling issue, or both.

#

Most likely, this is not random. cron is an owner-only tool.

So if the turn is coming from a non-owner sender, or from a group/thread profile that strips control-plane tools, the agent simply will not be allowed to create cron jobs. That matches the “sometimes works, mostly doesn’t” pattern pretty well.

Also, if you’re using a weaker/local model, tool calling for things like cron is a lot less reliable. And if you enabled agents.defaults.localModelMode: "lean", OpenClaw can drop tools like cron entirely.

What to check first:

  1. openclaw --version
  2. confirm the sender is owner-authorized, not just group-allowed
  3. check your tool policy / sandbox is not denying cron
  4. if the schedule matters, create the cron via CLI or Control UI instead of relying on the model to decide

Useful docs:

#

If you paste these, I can usually pinpoint the exact blocker fast:

openclaw --version
openclaw status
openclaw cron status

If you want, also paste your tools config and the relevant channel allowFrom / group config.

brazen temple
#

Give me a prompt to give my agent for this

red cedarBOT
#

Yep. Use something like this:

When a task needs to happen later, use the OpenClaw `cron` tool instead of just saying you will remember it.

Rules:
1. If I ask for a reminder, follow-up, check-in, scheduled report, or recurring task, create a cron job.
2. Before creating one, check existing cron jobs and avoid duplicates for the same purpose.
3. Use a one-shot job for single reminders.
4. Use a recurring cron job only if I clearly asked for repetition.
5. For simple reminders, prefer `sessionTarget: "main"` with a system event.
6. For real background work, prefer `sessionTarget: "isolated"` with a clear message prompt.
7. Always give the job a short, descriptive name and description.
8. After creating the job, tell me:
   - job id
   - schedule