Skip to content

Hardening Cron Jobs and Aligning Schemas

I have spent too much time debugging logs where a request looks perfectly fine but gets rejected by the server. It is frustrating when a tool sends data in a format that is just slightly different from what the API expects, leading to constant validation errors and broken automations.

I wanted to make our cron system more forgiving and consistent. We noticed that some clients were sending wrapped payloads or missing specific fields, which caused cron.add to fail. I have updated the logic to handle these cases automatically so you can focus on building rather than formatting JSON.

  • Access to the Gateway API for cron.add and cron.update calls.
  • The latest version of the CLI.
  • Control UI for monitoring job status.
  • One of the supported providers: Discord, Slack, Signal, or iMessage.
  1. Send wrapped payloads: You can now send job data wrapped in data or job objects. The gateway automatically unwraps these for cron.add and cron.update instead of rejecting them as invalid.
  2. Omit redundant kind fields: If the schedule or payload type is clear, the system now infers the kind fields. You do not need to specify them manually when the intent is safe to determine.
  3. Use default settings: You can skip wakeMode and sessionTarget in your requests. I have added safe defaults for these fields so your jobs will still be created correctly if they are missing.
  4. Verify in Control UI: Open the UI to check your cron status. The display now correctly uses the jobs field from the gateway to show your job count.
  • INVALID_REQUEST errors: If your cron.add calls are still failing, check if you are trying to send an explicit state. The current schema disallows clients from setting the job state directly during creation.
  • Missing webchat provider: If you are looking for webchat in the delivery options, it is currently filtered out during delivery resolution. Stick to Discord, Slack, Signal, or iMessage for now.

If you need help with your specific configuration, ask the AI Setup Assistant.

OpenClaw

OpenClaw Expert

Still stuck?

If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.