#Cron Job help

1 messages · Page 1 of 1 (latest)

zinc glade
#

Hi,

I want to set a cron where my bot will send me based on my need to Discord,/Telegram, or in the OpenClaw web.

The thing I want is:

  • Send me the Tech Market update
  • Send me AI Update news
  • Get a specific daily post from a website or X profile and send it to me every day.

I want the cron to show up in:

  • Discord
  • Telegram
  • Web
  • Or whatever I set up
idle turtleBOT
tired domeBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

pale scarabBOT
#

Yep, this is a good fit for cron.

A few important details first:

  • Yes: cron can send results to Discord or Telegram
  • Yes: you can manage cron jobs in the Control UI / web
  • But: WebChat is not an outbound channel target. It’s an internal web session view, not a --channel web destination

So the pattern is:

  1. create an isolated cron job
  2. give it a prompt (--message)
  3. choose delivery with --announce --channel ... --to ...

1) Discord example

Send a daily AI news brief to a Discord DM:

#
openclaw cron add \
  --name "Daily AI News Discord" \
  --cron "0 8 * * *" \
  --tz "UTC" \
  --session isolated \
  --message "Summarize the most important AI news from the last 24 hours in 5 bullets with links." \
  --announce \
  --channel discord \
  --to "user:YOUR_DISCORD_USER_ID"

For a Discord channel instead of DM:

--to "channel:YOUR_CHANNEL_ID"
#

2) Telegram example

Send a daily market update to Telegram:

openclaw cron add \
  --name "Daily Tech Market Telegram" \
  --cron "0 9 * * *" \
  --tz "UTC" \
  --session isolated \
  --message "Give me a tech market update for the last 24 hours, concise, with key movers and why they matter." \
  --announce \
  --channel telegram \
  --to "YOUR_TELEGRAM_CHAT_ID"

3) Website / X profile example

For a website:

#
openclaw cron add \
  --name "Daily Site Post" \
  --cron "0 10 * * *" \
  --tz "UTC" \
  --session isolated \
  --message "Check https://example.com/blog and send me today's newest post with a short summary. If there is no new post, say so." \
  --announce \
  --channel discord \
  --to "user:YOUR_DISCORD_USER_ID"

For X, it can work if the profile/posts are public, but X is less reliable than normal websites or RSS feeds. If you have an RSS feed, I’d use that instead.

About “show up in Web”

If you want it visible in the web UI only, use internal/no delivery instead of a chat channel. The run stays in OpenClaw session history:

#
openclaw cron add \
  --name "Web Only Daily Brief" \
  --cron "0 7 * * *" \
  --tz "UTC" \
  --session "session:daily-brief" \
  --message "Summarize today's AI and tech updates." \
  --no-deliver

Then view that session in the Control UI / WebChat.

One important limitation

A cron job has one primary delivery target. So if you want the same brief in both Discord and Telegram, the simplest setup is:

  • make two cron jobs
  • same prompt
#

Just send me:

  • your timezone
  • Discord DM or channel ID
  • Telegram chat ID
  • the website or X profile you want to track
zinc glade
#

Now how to set it up with the timed cron which is daily?

Also like I want cron from specific X account such as OpenClaw X account and whatever they post daily will send to me.

heres some details for dummy test

Time: 10 AM.
Everyday
Timezon: GMT +6, Dhaka/Asia

pale scarabBOT
#

Yep, for daily at 10:00 AM in Dhaka use:

--cron "0 10 * * *" --tz "Asia/Dhaka"

That means every day at 10:00 AM Asia/Dhaka time.

Ready-to-paste examples

1) Daily AI news to Discord

openclaw cron add \
  --name "Daily AI News" \
  --cron "0 10 * * *" \
  --tz "Asia/Dhaka" \
#
  --session isolated \
  --message "Summarize the most important AI news from the last 24 hours in 5 concise bullets with links." \
  --announce \
  --channel discord \
  --to "user:YOUR_DISCORD_USER_ID"

If you want a Discord channel instead of DM, use:

--to "channel:YOUR_CHANNEL_ID"

2) Daily tech market update to Telegram

#
openclaw cron add \
  --name "Daily Tech Market Update" \
  --cron "0 10 * * *" \
  --tz "Asia/Dhaka" \
  --session isolated \
  --message "Give me a concise tech market update for the last 24 hours, including major moves, important companies, and why they matter." \
  --announce \
  --channel telegram \
  --to "YOUR_TELEGRAM_CHAT_ID"

3) Daily OpenClaw X account update

For the OpenClaw X account:

#
openclaw cron add \
  --name "OpenClaw X Daily Post" \
  --cron "0 10 * * *" \
  --tz "Asia/Dhaka" \
  --session isolated \
  --message "Check https://x.com/openclaw and send me the newest post from the last 24 hours. Include the full post text and a 1-2 line summary. If there is no new post, say 'No new post today'." \
  --announce \
  --channel discord \
  --to "user:YOUR_DISCORD_USER_ID"

If you want it in both Discord and Telegram

Make two cron jobs with the same --message, but different:

  • --channel discord --to ...
  • --channel telegram --to ...
#

One cron job = one delivery target.

If you want it visible in OpenClaw web only

Use internal delivery:

openclaw cron add \
  --name "Web Only Daily Brief" \
  --cron "0 10 * * *" \
  --tz "Asia/Dhaka" \
  --session "session:daily-brief" \
  --message "Summarize today's AI news and tech market updates." \
  --no-deliver

That will stay in OpenClaw session history and show in the web UI. There is no --channel web target.

#
  • your Telegram chat ID
  • the exact website/X accounts

and I’ll format the exact final commands for your setup.

zinc glade
#

Where do I send it? To my Bot?

Also, what's that cron 0 10 ***?

Can't I use "at"?

pale scarabBOT
#

The command does not get sent to your bot in chat.

You do one of these:

  1. run it in the terminal on the machine where OpenClaw is installed, or
  2. create it in the Control UI → Cron Jobs

Then the cron result gets delivered by your bot to Discord / Telegram / web, depending on --channel / --to.

Short version

  • You run openclaw cron add ...
  • Your bot sends the output later

What does 0 10 * * * mean?

That’s a cron expression:

#
0 10 * * *
│ │  │ │ │
│ │  │ │ └ day of week = any
│ │  │ └ month = any
│ │  └ day of month = any
│ └ hour = 10
└ minute = 0

So it means:

Every day at 10:00

With:

#
--tz "Asia/Dhaka"

it becomes:

Every day at 10:00 AM Dhaka time

Can you use --at?

Yes, but --at is one-time only.

Use --at for:

  • “tomorrow at 10 AM”
  • “in 20 minutes”
  • one reminder
#

Use --cron for:

  • every day at 10 AM
  • every Monday
  • recurring schedules

Example of --at:

openclaw cron add \
  --name "One time test" \
  --at "2026-04-21T10:00:00+06:00" \
  --session isolated \
  --message "Test message" \
  --announce \
  --channel discord \
  --to "user:YOUR_DISCORD_USER_ID"
#

Example of daily recurring:

openclaw cron add \
  --name "Daily test" \
  --cron "0 10 * * *" \
  --tz "Asia/Dhaka" \
  --session isolated \
  --message "Test message" \
  --announce \
  --channel discord \
  --to "user:YOUR_DISCORD_USER_ID"

Where does it go?

That part is controlled by:

#
  • --channel discord --to "user:..." → Discord DM
  • --channel discord --to "channel:..." → Discord channel
  • --channel telegram --to "..." → Telegram chat
  • --no-deliver → keep it internal for web/OpenClaw session view

So yes, your bot is the thing that sends it, but you create the cron in CLI or Control UI.

If you want, I can give you one exact test command for:

  • Discord DM
  • Telegram
  • web-only

Just tell me which one you want to test first.

zinc glade
#

echo 'oc(){ docker exec -it openclaw-b8wu-openclaw-1 openclaw "$@"; }' >> ~/.bashrc && source ~/.bashrc

My shortcut and docker is like this. Set a template now.

openclaw cron add \ doesn't work.

pale scarabBOT
#

Ah, got it, then use oc, not openclaw.

Your wrapper means:

oc cron add ...

not:

openclaw cron add ...

First test that the shortcut works

#
oc --version
oc cron list

If those fail, use the full Docker command directly:

docker exec -it openclaw-b8wu-openclaw-1 openclaw cron list

Ready-to-use templates

1) Discord DM, daily 10 AM Dhaka, AI news

oc cron add \
#
  --name "Daily AI News" \
  --cron "0 10 * * *" \
  --tz "Asia/Dhaka" \
  --session isolated \
  --message "Summarize the most important AI news from the last 24 hours in 5 concise bullets with links." \
  --announce \
  --channel discord \
  --to "user:YOUR_DISCORD_USER_ID"

2) Telegram, daily 10 AM Dhaka, tech market

oc cron add \
  --name "Daily Tech Market" \
  --cron "0 10 * * *" \
#
  --tz "Asia/Dhaka" \
  --session isolated \
  --message "Give me a concise tech market update for the last 24 hours, including major moves and why they matter." \
  --announce \
  --channel telegram \
  --to "YOUR_TELEGRAM_CHAT_ID"

3) OpenClaw X account, daily 10 AM Dhaka

oc cron add \
  --name "OpenClaw X Daily" \
  --cron "0 10 * * *" \
  --tz "Asia/Dhaka" \
  --session isolated \
#
  --message "Check https://x.com/openclaw and send me the newest post from the last 24 hours. Include the full post text and a short summary. If there is no new post, say 'No new post today'." \
  --announce \
  --channel discord \
  --to "user:YOUR_DISCORD_USER_ID"

4) Web only

oc cron add \
  --name "Web Daily Brief" \
  --cron "0 10 * * *" \
  --tz "Asia/Dhaka" \
  --session "session:daily-brief" \
  --message "Summarize today's AI news and tech market updates." \
  --no-deliver
#

If multiline is being annoying, use one line

Sometimes copy/paste with \ is annoying. This works too:

oc cron add --name "Daily AI News" --cron "0 10 * * *" --tz "Asia/Dhaka" --session isolated --message "Summarize the most important AI news from the last 24 hours in 5 concise bullets with links." --announce --channel discord --to "user:YOUR_DISCORD_USER_ID"

Important

  • 0 10 * * * = every day at 10:00
  • --at is for one-time only
  • for recurring daily jobs, use --cron

If oc cron add still fails, send:

oc --version
oc cron add --help
#

and the exact error text.

Glad that helped! 🎉
If this fixed it, please right-click the solution message → Apps → ✅ Mark Solution.
This helps Answer Overflow index the solution for future users.

zinc glade
#

My discord ID

1302991150763999302

Set up the template now

pale scarabBOT
#

Perfect, then these will send to your Discord DM:

--channel discord --to "user:1302991150763999302"

1) Daily AI news, 10 AM Dhaka

oc cron add \
  --name "Daily AI News" \
  --cron "0 10 * * *" \
  --tz "Asia/Dhaka" \
  --session isolated \
  --message "Summarize the most important AI news from the last 24 hours in 5 concise bullets with links." \
  --announce \
  --channel discord \
#
  --to "user:1302991150763999302"

2) Daily tech market update, 10 AM Dhaka

oc cron add \
  --name "Daily Tech Market" \
  --cron "0 10 * * *" \
  --tz "Asia/Dhaka" \
  --session isolated \
  --message "Give me a concise tech market update for the last 24 hours, including major moves, important companies, and why they matter." \
  --announce \
  --channel discord \
  --to "user:1302991150763999302"
#

3) Daily OpenClaw X update, 10 AM Dhaka

oc cron add \
  --name "OpenClaw X Daily" \
  --cron "0 10 * * *" \
  --tz "Asia/Dhaka" \
  --session isolated \
  --message "Check https://x.com/openclaw and send me the newest post from the last 24 hours. Include the full post text and a short summary. If there is no new post, say 'No new post today'." \
  --announce \
  --channel discord \
  --to "user:1302991150763999302"

If you want one combined brief instead

oc cron add \
#
  --name "Daily Combined Brief" \
  --cron "0 10 * * *" \
  --tz "Asia/Dhaka" \
  --session isolated \
  --message "Create one daily brief with 3 sections: 1) tech market update, 2) AI news update, 3) latest post from https://x.com/openclaw in the last 24 hours. Keep it concise and include links." \
  --announce \
  --channel discord \
  --to "user:1302991150763999302"

Check that they were created

oc cron list

Manual test run

#

After creating one, test it with:

oc cron run <job-id>

If you want, next I can format the same templates for:

  • Telegram
  • web-only
  • a specific website instead of X

Glad that helped! 🎉
If this fixed it, please right-click the solution message → Apps → ✅ Mark Solution.
This helps Answer Overflow index the solution for future users.

zinc glade
#

Whenever I'm texting from Discord or Telegram, it's sending to a same session instead of separate one. The all chats showing up in the main agent. Is it suppoise to do that?

pale scarabBOT
#

If these are DMs, then yes, that’s expected by default.

OpenClaw’s default is:

  • DMs → all go into the agent’s main session
  • groups/channels/threads → separate sessions

So Discord DM + Telegram DM landing in the same main session is normal unless you change dmScope.

If you want Discord and Telegram separated

Set:

oc config set session.dmScope per-channel-peer

That gives you a separate DM session per:

#
  • channel
  • sender

So your Discord DM and Telegram DM won’t merge anymore.

If you want to verify it

oc config get session.dmScope

It should show:

per-channel-peer

If it does not take effect immediately

#
oc config get session.dmScope

and the exact chat types you’re testing.

zinc glade
#

I wanna set cron at time to my Discord DM to test it out.

User ID: 1302991150763999302

Just a greet to test it out. Im on Asia/Dhaka time and want it to be iafter 5 mins

pale scarabBOT
#

Yep, easiest test is a one-shot cron with --at "5m".

You don’t need --tz for a relative delay like 5 minutes.

Exact test command

oc cron add \
  --name "Discord DM test greet" \
  --at "5m" \
  --session isolated \
  --message "Send a short greeting: Hi Ra Kib, this is your OpenClaw cron test 👋" \
  --announce \
  --channel discord \
  --to "user:1302991150763999302"
#

Then check it exists

oc cron list

Notes

  • --at "5m" = run once, 5 minutes from now
  • one-shot jobs usually auto-delete after success
  • this should DM your Discord user directly, assuming your bot can DM you

If you want, I can also give you:

  1. a Telegram 5-minute test
  2. a daily 10 AM Dhaka test
  3. a web-only test
zinc glade
#

🦞 OpenClaw 2026.4.12 (1c0672b) — I'll butter your workflow like a lobster roll: messy, delicious, effective.

│
◇  
ID                                   Name                     Schedule                         Next       Last       Status    Target    Agent ID   Model               
e98b2f3b-43fa-4823-bd95-9f15f1435408 Discord DM test greet    at 2026-04-20 18:58Z             in 4m      -          idle      isolated  -          -                   
root@srv1584299:~# ```
pale scarabBOT
#

Nice, that looks correct 👍

Your cron is created and scheduled:

  • Job ID: e98b2f3b-43fa-4823-bd95-9f15f1435408
  • Runs in: about 4 minutes
  • Type: one-shot at
  • Target: isolated run, then announce to your Discord DM

So now the move is just: wait for the DM.

If you want to check the result after it fires

oc cron runs --id e98b2f3b-43fa-4823-bd95-9f15f1435408

If you want to force-run it immediately instead of waiting

#
oc cron run e98b2f3b-43fa-4823-bd95-9f15f1435408

If it doesn’t DM you, paste the output of:

oc cron runs --id e98b2f3b-43fa-4823-bd95-9f15f1435408

and I’ll help debug the delivery part.

zinc glade
#

It didn't DM me. I got error on cron job interface from Web

pale scarabBOT
#

I think it just hadn’t fired yet when you checked.

From your earlier output:

Schedule: at 2026-04-20 18:58Z

And your message here came in at 18:57 UTC, so it was still about a minute early.

Do this next

1) Wait until after 18:58Z, then check:

oc cron runs --id e98b2f3b-43fa-4823-bd95-9f15f1435408
#

2) Or force it right now

oc cron run e98b2f3b-43fa-4823-bd95-9f15f1435408

Important

If the Web cron UI is showing an error, please paste the exact error text. That part matters.

So right now I’d check these 2 things:

oc cron run e98b2f3b-43fa-4823-bd95-9f15f1435408
oc cron runs --id e98b2f3b-43fa-4823-bd95-9f15f1435408

If it still doesn’t DM you after that, paste:

#
  • the output of oc cron runs --id ...
  • the exact web UI error

and I’ll help you pin it down.

zinc glade
#

I forced it but it didn't show up. How to fix it? Do step by step

pale scarabBOT
#

Yep. Let’s do this the clean way, step by step.

Most likely, the cron itself is fine and the Discord DM delivery is what’s blocked.

Step 1, check the actual cron run result

Run this first:

oc cron runs --id e98b2f3b-43fa-4823-bd95-9f15f1435408 --limit 20

This tells us whether the cron:

  • ran successfully
  • failed before delivery
  • failed on Discord delivery
#

Step 2, make sure your bot can DM you on Discord

In Discord:

  1. Right-click the server where your bot is
  2. Open Privacy Settings
  3. Turn on Direct Messages

If this is off, the bot often can’t DM you.

Step 3, DM your bot manually once

Open a direct message with your bot and send anything, like:

hi
#

This matters because Discord DM + pairing can block outbound DM behavior until the DM path is actually established.

Step 4, check if Discord pairing is pending

Run:

oc pairing list discord

If you see a pending code, approve it:

oc pairing approve discord <CODE>

Step 5, force the cron again

#
oc cron run e98b2f3b-43fa-4823-bd95-9f15f1435408

Then immediately check:

oc cron runs --id e98b2f3b-43fa-4823-bd95-9f15f1435408 --limit 20

Step 6, if it still fails, grab the live error

Run this in one terminal:

oc logs --follow
#

Then in another terminal run:

oc cron run e98b2f3b-43fa-4823-bd95-9f15f1435408

Now paste:

  • the output of oc cron runs --id ...
  • the exact error from oc logs --follow
  • the exact web UI error text

What I suspect right now

Most likely one of these:

#
  • Discord DMs are disabled in server privacy settings
  • Discord DM pairing is still pending
  • the cron ran, but delivery hit a Discord permission/auth issue

Start with Step 1 and Step 4 first, they’re the fastest.

Glad that helped! 🎉
If this fixed it, please right-click the solution message → Apps → ✅ Mark Solution.
This helps Answer Overflow index the solution for future users.

zinc glade
#

I told you step by step. Waait with one.

My Discord DM is paired. I just dmed her and she replied back. But cron shows error and not delivered.

pale scarabBOT
#

You’re right, let’s do one step only.

Since DM pairing already works, the next step is just this:

oc cron runs --id e98b2f3b-43fa-4823-bd95-9f15f1435408 --limit 20

Paste that output here.

That will tell us the exact cron delivery failure, and then I’ll give you the next single step only.

zinc glade
#

🦞 OpenClaw 2026.4.12 (1c0672b) — I'll refactor your busywork like it owes me money.

│
◇  
{
  "entries": [
    {
      "ts": 1776711562577,
      "jobId": "e98b2f3b-43fa-4823-bd95-9f15f1435408",
      "action": "finished",
      "status": "error",
      "error": "Error: Unknown Channel",
      "summary": "Send to Ra Kib via Discord DM: “Hi Ra Kib, this is your OpenClaw cron test 👋”",
      "runAtMs": 1776711548238,
      "durationMs": 14336,
      "model": "openai/gpt-5.4-mini",
      "provider": "openrouter",
      "usage": {
        "input_tokens": 150,
        "output_tokens": 480,
        "total_tokens": 10390
      },
      "deliveryStatus": "unknown",
      "sessionId": "1faa9a61-cdb0-4e3c-a3e9-b8df74dd35c8",
      "sessionKey": "agent:main:cron:e98b2f3b-43fa-4823-bd95-9f15f1435408:run:1faa9a61-cdb0-4e3c-a3e9-b8df74dd35c8"
    },
    {
      "ts": 1776711424152,
      "jobId": "e98b2f3b-43fa-4823-bd95-9f15f1435408",
      "action": "finished",
      "status": "error",
      "error": "Error: Unknown Channel",
      "summary": "Would send a short Discord DM greeting to Ra Kib: “Hi Ra Kib, this is your OpenClaw cron test 👋”",
      "runAtMs": 1776711413041,
      "durationMs": 11108,
      "model": "openai/gpt-5.4-mini",
      "provider": "openrouter",
      "usage": {
        "input_tokens": 150,
        "output_tokens": 301,
        "total_tokens": 10390
      },
      "deliveryStatus": "unknown",
      "sessionId": "dcd90d3e-a544-4c1a-bd6a-20d0061a6d24",
      "sessionKey": "agent:main:cron:e98b2f3b-43fa-4823-bd95-9f15f1435408:run:dcd90d3e-a544-4c1a-bd6a-20d0061a6d24"
    },
    {
      "ts": 1776711403998,
      "jobId": "e98b2f3b-43fa-4823-bd95-9f15f1435408",
      "action": "finished",
      "status": "error",
      "error": "Error: Unknown Channel",
      "summary": "I can send it, but Discord needs a resolvable target like `user:ID` or `channel:ID`.  \nPlease give me Ra Kib’s Discord user ID, or tell me the exact DM target format to use.",
      "runAtMs": 1776711385395,
      "durationMs": 18598,
      "model": "openai/gpt-5.4-mini",
      "provider": "openrouter",
      "usage": {
        "input_tokens": 11051,
        "output_tokens": 818,
        "total_tokens": 10901
      },
      "deliveryStatus": "unknown",
      "sessionId": "816308dd-6199-4bd6-a0c5-b778e3b3ce32",
      "sessionKey": "agent:main:cron:e98b2f3b-43fa-4823-bd95-9f15f1435408:run:816308dd-6199-4bd6-a0c5-b778e3b3ce32"
    }
  ],
  "total": 3,
  "offset": 0,
  "limit": 20,
  "hasMore": false,
  "nextOffset": null```
pale scarabBOT
#

Good, now we have the real clue:

Error: Unknown Channel

So the next single step is to rewrite the cron’s delivery fields explicitly:

oc cron edit e98b2f3b-43fa-4823-bd95-9f15f1435408 \
  --announce \
  --channel discord \
  --to "user:1302991150763999302" \
  --account default

Run that and tell me what it prints.

#

Then I’ll give you the next one step only.

zinc glade
#
  --announce \
  --channel discord \
  --to "user:1302991150763999302" \
  --account default

🦞 OpenClaw 2026.4.12 (1c0672b) — Gateway online—please keep hands, feet, and appendages inside the shell at all times.

│
◇  
{
  "id": "e98b2f3b-43fa-4823-bd95-9f15f1435408",
  "name": "Discord DM test greet",
  "enabled": false,
  "deleteAfterRun": true,
  "createdAtMs": 1776711222532,
  "updatedAtMs": 1776711952164,
  "schedule": {
    "kind": "at",
    "at": "2026-04-20T18:58:41.550Z"
  },
  "sessionTarget": "isolated",
  "wakeMode": "now",
  "payload": {
    "kind": "agentTurn",
    "message": "Send a short greeting: Hi Ra Kib, this is your OpenClaw cron test 👋"
  },
  "delivery": {
    "mode": "announce",
    "channel": "discord",
    "to": "user:1302991150763999302",
    "accountId": "default"
  },
  "state": {
    "lastError": "Error: Unknown Channel",
    "lastRunAtMs": 1776711548238,
    "lastRunStatus": "error",
    "lastStatus": "error",
    "lastDurationMs": 14336,
    "lastDeliveryStatus": "unknown",
    "consecutiveErrors": 3
  }
}
│
◇```
pale scarabBOT
#

Perfect. The stored delivery config now looks correct.

That lastError is still the old one from the previous run, so the next single step is just to run it again:

oc cron run e98b2f3b-43fa-4823-bd95-9f15f1435408

Then tell me:

  • did the DM arrive, or
  • what the command printed

and I’ll give you the next one step only.

#

Let’s keep this thread on the cron issue.

Ra Kib, the next step is still:

oc cron run e98b2f3b-43fa-4823-bd95-9f15f1435408

Then tell me either:

  • DM arrived, or
  • paste what oc cron runs --id e98b2f3b-43fa-4823-bd95-9f15f1435408 --limit 20 shows after that run.
zinc glade
#

oc cron run e98b2f3b-43fa-4823-bd95-9f15f1435408

pale scarabBOT
#

Good, now the next single step is:

oc cron runs --id e98b2f3b-43fa-4823-bd95-9f15f1435408 --limit 20

Paste that output.

That will show whether the new run still hit Unknown Channel or changed to something more useful.

zinc glade
#

🦞 OpenClaw 2026.4.12 (1c0672b) — I'll do the boring stuff while you dramatically stare at the logs like it's cinema.

│
◇  
{
  "ok": true,
  "enqueued": true,
  "runId": "manual:e98b2f3b-43fa-4823-bd95-9f15f1435408:1776712068113:6"```
pale scarabBOT
#

Perfect, that means the run was queued successfully.

Now the next single step is:

oc cron runs --id e98b2f3b-43fa-4823-bd95-9f15f1435408 --limit 20

Paste that output after a few seconds.

zinc glade
#

🦞 OpenClaw 2026.4.12 (1c0672b) — I keep secrets like a vault... unless you print them in debug logs again.

│
◇  
{
  "entries": [
    {
      "ts": 1776712084207,
      "jobId": "e98b2f3b-43fa-4823-bd95-9f15f1435408",
      "action": "finished",
      "status": "error",
      "error": "Error: Unknown Channel",
      "summary": "Need to send to Discord recipient as `user:ID` or `channel:ID`; `Ra Kib` wasn’t resolvable.",
      "runAtMs": 1776712068113,
      "durationMs": 16090,
      "model": "openai/gpt-5.4-mini",
      "provider": "openrouter",
      "usage": {
        "input_tokens": 296,
        "output_tokens": 645,
        "total_tokens": 10898
      },
      "deliveryStatus": "unknown",
      "sessionId": "418a713c-798e-4afc-9fd6-c10f52ab3069",
      "sessionKey": "agent:main:cron:e98b2f3b-43fa-4823-bd95-9f15f1435408:run:418a713c-798e-4afc-9fd6-c10f52ab3069"
    },
    {
      "ts": 1776712060249,
      "jobId": "e98b2f3b-43fa-4823-bd95-9f15f1435408",
      "action": "finished",
      "status": "error",
      "error": "Error: Unknown Channel",
      "summary": "Couldn’t send it as-is: Discord target “Ra Kib” wasn’t resolvable. It needs a valid `user:ID` or `channel:ID`.",
      "runAtMs": 1776712043345,
      "durationMs": 16901,
      "model": "openai/gpt-5.4-mini",
      "provider": "openrouter",
      "usage": {
        "input_tokens": 808,
        "output_tokens": 825,
        "total_tokens": 10898
      },
      "deliveryStatus": "unknown",
      "sessionId": "385b08bf-41da-4eb7-93a9-f7047779c50d",
      "sessionKey": "agent:main:cron:e98b2f3b-43fa-4823-bd95-9f15f1435408:run:385b08bf-41da-4eb7-93a9-f7047779c50d"
    },
    {
      "ts": 1776711562577,
      "jobId": "e98b2f3b-43fa-4823-bd95-9f15f1435408",
      "action": "finished",
      "status": "error",
      "error": "Error: Unknown Channel",
      "summary": "Send to Ra Kib via Discord DM: “Hi Ra Kib, this is your OpenClaw cron test 👋”",
      "runAtMs": 1776711548238,
      "durationMs": 14336,
      "model": "openai/gpt-5.4-mini",
      "provider": "openrouter",
      "usage": {
        "input_tokens": 150,
        "output_tokens": 480,
        "total_tokens": 10390
      },
      "deliveryStatus": "unknown",
      "sessionId": "1faa9a61-cdb0-4e3c-a3e9-b8df74dd35c8",
      "sessionKey": "agent:main:cron:e98b2f3b-43fa-4823-bd95-9f15f1435408:run:1faa9a61-cdb0-4e3c-a3e9-b8df74dd35c8"
    },
    {
      "ts": 1776711424152,
      "jobId": "e98b2f3b-43fa-4823-bd95-9f15f1435408",
      "action": "finished",
      "status": "error",
      "error": "Error: Unknown Channel",
      "summary": "Would send a short Discord DM greeting to Ra Kib: “Hi Ra Kib, this is your OpenClaw cron test 👋”",
      "runAtMs": 1776711413041,
      "durationMs": 11108,
      "model": "openai/gpt-5.4-mini",
      "provider": "openrouter",
      "usage": {
        "input_tokens": 150,
        "output_tokens": 301,
        "total_tokens": 10390
      },
      "deliveryStatus": "unknown",
      "sessionId": "dcd90d3e-a544-4c1a-bd6a-20d0061a6d24",
      "sessionKey": "agent:main:cron:e98b2f3b-43fa-4823-bd95-9f15f1435408:run:dcd90d3e-a544-4c1a-bd6a-20d0061a6d24"
    },
    {
      "ts": 1776711403998,
      "jobId": "e98b2f3b-43fa-4823-bd95-9f15f1435408",
      "action": "finished",
      "status": "error",
      "error": "Error: Unknown Channel",
      "summary": "I can send it, but Discord needs a resolvable target like `user:ID` or `channel:ID`.  \nPlease give me Ra Kib’s Discord user ID, or tell me the exact DM target format to use.",
      "runAtMs": 1776711385395,
      "durationMs": 18598,
      "model": "openai/gpt-5.4-mini",
      "provider": "openrouter",
      "usage": {
        "input_tokens": 11051,
        "output_tokens": 818,
        "total_tokens": 10901
      },
      "deliveryStatus": "unknown",
      "sessionId": "816308dd-6199-4bd6-a0c5-```
pale scarabBOT
#

Found it.

The problem is your cron prompt says “Send a short greeting…”, so the agent is trying to do the sending itself, instead of just returning text for the cron runner to deliver.

So the next single step is to change the cron message to plain output only:

oc cron edit e98b2f3b-43fa-4823-bd95-9f15f1435408 \
  --message "Reply with exactly this text and nothing else: Hi Ra Kib, this is your OpenClaw cron test 👋"

Run that and paste what it prints.

zinc glade
#
  --message "Reply with exactly this text and nothing else: Hi Ra Kib, this is your OpenClaw cron test :wave:"

:lobster: OpenClaw 2026.4.12 (1c0672b) — Built by lobsters, for humans. Don't question the hierarchy.

│
◇  
{
  "id": "e98b2f3b-43fa-4823-bd95-9f15f1435408",
  "name": "Discord DM test greet",
  "enabled": false,
  "deleteAfterRun": true,
  "createdAtMs": 1776711222532,
  "updatedAtMs": 1776712268927,
  "schedule": {
    "kind": "at",
    "at": "2026-04-20T18:58:41.550Z"
  },
  "sessionTarget": "isolated",
  "wakeMode": "now",
  "payload": {
    "kind": "agentTurn",
    "message": "Reply with exactly this text and nothing else: Hi Ra Kib, this is your OpenClaw cron test :wave:"
  },
  "delivery": {
    "mode": "announce",
    "channel": "discord",
    "to": "user:1302991150763999302",
    "accountId": "default"
  },
  "state": {
    "lastError": "Error: Unknown Channel",
    "lastRunAtMs": 1776712068113,
    "lastRunStatus": "error",
    "lastStatus": "error",
    "lastDurationMs": 16090,
    "lastDeliveryStatus": "unknown",
    "consecutiveErrors": 5
  }
}
│
◇```
pale scarabBOT
#

Nice. The cron payload is fixed now.

The next single step is to run it again:

oc cron run e98b2f3b-43fa-4823-bd95-9f15f1435408

Then tell me if the DM arrives. If not, I’ll give you the next one step only.

#

Let’s keep this thread focused on the cron issue.

Ra Kib, the next step is still:

oc cron run e98b2f3b-43fa-4823-bd95-9f15f1435408

Then tell me just one thing:

  • DM arrived, or
  • still failed.
zinc glade
#

No DM


🦞 OpenClaw 2026.4.12 (1c0672b) — Automation with claws: minimal fuss, maximal pinch.

│
◇  
{
  "ok": true,
  "enqueued": true,
  "runId": "manual:e98b2f3b-43fa-4823-bd95-9f15f1435408:1776712359854:8"```
pale scarabBOT
#

Got it.

The next single step is:

oc cron runs --id e98b2f3b-43fa-4823-bd95-9f15f1435408 --limit 1

Paste that output.

I want to see the result of this latest run only.

zinc glade
#

🦞 OpenClaw 2026.4.12 (1c0672b) — I'm basically a Swiss Army knife, but with more opinions and fewer sharp edges.

│
◇  
{
  "entries": [
    {
      "ts": 1776712375068,
      "jobId": "e98b2f3b-43fa-4823-bd95-9f15f1435408",
      "action": "finished",
      "status": "error",
      "error": "Error: Unknown Channel",
      "summary": "Hi Ra Kib, this is your OpenClaw cron test 👋\nCurrent time: Tuesday, April 21st, 2026 - 12:42 AM (Asia/Calcutta) / 2026-04-20 19:12 UTC",
      "runAtMs": 1776712359854,
      "durationMs": 15210,
      "model": "openai/gpt-5.4-mini",
      "provider": "openrouter",
      "usage": {
        "input_tokens": 154,
        "output_tokens": 177,
        "total_tokens": 10394
      },
      "deliveryStatus": "unknown",
      "sessionId": "610c18f3-a7dc-4fc0-a0da-4f3b3a5d6fb3",
      "sessionKey": "agent:main:cron:e98b2f3b-43fa-4823-bd95-9f15f1435408:run:610c18f3-a7dc-4fc0-a0da-4f3b3a5d6fb3"
    }
  ],
  "total": 7,
  "offset": 0,
  "limit": 1,
  "hasMore": true,
  "nextOffset": 1
}```
pale scarabBOT
#

We’ve isolated it enough now.

The next single step is to test direct Discord outbound outside cron:

oc message send --channel discord --target "user:1302991150763999302" --message "Direct CLI test"

Then tell me just one thing:

  • DM arrived, or
  • paste the command output if it failed.
zinc glade
#

Got Dm.


:lobster: OpenClaw 2026.4.12 (1c0672b) — Pairing codes exist because even bots believe in consent—and good security hygiene.

│
◇  
:white_check_mark: Sent via Discord. Message ID: 1495865765797298319````
pale scarabBOT
#

Good, that isolates it.

  • Discord outbound works
  • Cron built-in --announce delivery does not

So this looks like a cron delivery bug on 2026.4.12, not your Discord setup.

The fastest single-step workaround is to make the cron use the message tool directly and disable runner delivery:

oc cron add \
  --name "Discord DM cron workaround" \
  --at "5m" \
  --session isolated \
  --message "Use the message tool to send exactly this text to channel discord target user:1302991150763999302: Hi Ra Kib, this is your OpenClaw cron test 👋. After sending successfully, reply exactly NO_REPLY." \
  --no-deliver
zinc glade
#
  --name "Discord DM cron workaround" \
  --at "5m" \
  --session isolated \
  --message "Use the message tool to send exactly this text to channel discord target user:1302991150763999302: Hi Ra Kib, this is your OpenClaw cron test 👋. After sending successfully, reply exactly NO_REPLY." \
  --no-deliver

🦞 OpenClaw 2026.4.12 (1c0672b) — Less clicking, more shipping, fewer "where did that file go" moments.

│
◇  
{
  "id": "69b263f4-6645-465e-871b-1aa618f7c5bb",
  "name": "Discord DM cron workaround",
  "enabled": true,
  "deleteAfterRun": true,
  "createdAtMs": 1776712748867,
  "updatedAtMs": 1776712748867,
  "schedule": {
    "kind": "at",
    "at": "2026-04-20T19:24:07.725Z"
  },
  "sessionTarget": "isolated",
  "wakeMode": "now",
  "payload": {
    "kind": "agentTurn",
    "message": "Use the message tool to send exactly this text to channel discord target user:1302991150763999302: Hi Ra Kib, this is your OpenClaw cron test 👋. After sending successfully, reply exactly NO_REPLY."
  },
  "delivery": {
    "mode": "none",
    "channel": "last"
  },
  "state": {
    "nextRunAtMs": 1776713047725
  }
}
│
◇ ```
pale scarabBOT
#

Nice. That workaround job is created correctly.

The next single step is to run it now instead of waiting 5 minutes:

oc cron run 69b263f4-6645-465e-871b-1aa618f7c5bb

Then tell me if the DM arrives.

zinc glade
#

Got DM but a bit weird way.

let's try with normal greet dm

pale scarabBOT
#

Nice, that means the workaround path works 👍

For a cleaner normal DM, use this exact test:

oc cron add \
  --name "Discord normal greet" \
  --at "2m" \
  --session isolated \
  --message "Use the message tool to send exactly this Discord DM to target user:1302991150763999302 on channel discord: Hi Ra Kib 👋. After sending successfully, reply exactly NO_REPLY." \
  --no-deliver

That should send just:

#
Hi Ra Kib 👋

If you want, next I can turn that into the real daily jobs for:

  • tech market update
  • AI news update
  • OpenClaw X post update
zinc glade
#

I got the DM but in a ,weird way with blue box with a later X

pale scarabBOT
#

Yep, that tracks.

The blue box / odd-looking DM is from the workaround path, not the normal cron delivery path. So it works, but it’s a bit janky.

What’s going on

  • Normal path: cron --announce --channel discord --to "user:..."

    • should send a normal DM
    • on your 2026.4.12, this is the part that’s broken
  • Workaround path: cron tells the agent to use the message tool directly

    • gets the DM through
    • but can render weirdly in Discord

My recommendation

At this point, I’d treat this as a version-specific bug and update OpenClaw, then retry the normal cron delivery.

#

There have been cron delivery fixes after 2026.4.12.

After updating, retry the normal version

oc cron add \
  --name "Discord normal greet native" \
  --at "2m" \
  --session isolated \
  --message "Reply with exactly this text and nothing else: Hi Ra Kib 👋" \
  --announce \
  --channel discord \
  --to "user:1302991150763999302" \
  --account default

If you want, send me how you installed OpenClaw in Docker and I’ll give you the exact update command for your setup, one step at a time.

zinc glade
#

I did it before and worked as reminder. With my old bot, The DM was different on that time then the main seassion where every dm is showing up

pale scarabBOT
#

Yep, that makes sense. There are two separate things here:

  1. DM session routing
    By default, OpenClaw puts DMs into the main session.
    If you want Discord and Telegram DMs separated, use:

    oc config set session.dmScope per-channel-peer
    
  2. Cron delivery style
    A normal cron DM should look like a plain outbound message.
    On your current 2026.4.12, that native cron delivery path looks broken, so the workaround goes through the normal DM/message path, which is why it feels more like the main session.

So your old bot likely had either:

  • a newer / different build where native cron DM delivery worked properly, or
#
  • different session routing config

If your goal is:

  • separate DM sessionssession.dmScope per-channel-peer
  • clean normal cron DMs → update OpenClaw and use native --announce

If you want, I can give you the exact next command for either:

  • fixing DM session separation, or
  • retrying the native cron DM after update.
zinc glade
#

🦞 OpenClaw 2026.4.12 (1c0672b) — I've seen your commit messages. We'll work on that together.

Config overwrite: /data/.openclaw/openclaw.json (sha256 8139ef906439f01729f6c3e94818e71e7526fb4f8cc3c7a30e1111a16c028a0b -> 0da785ff3df43cf895c9d915908a279f0e075f4f33616c85e7fafcff45ae8c47, backup=/data/.openclaw/openclaw.json.bak)
Updated session.dmScope. Restart the gateway to apply```
pale scarabBOT
#

Nice, that part is set.

The next single step is to restart your OpenClaw container so the new dmScope takes effect:

docker restart openclaw-b8wu-openclaw-1

After that, your DM routing should stop collapsing into the same main session.

zinc glade
#

Ok, now I can see

agent:main:main

agent:main:discord:direct:1302991150763999302

agent:main:telegram:direct:7900865099

This is good rather then all together

pale scarabBOT
#

Yep, that’s the right shape now 👍

You’ve got:

  • agent:main:main → the main session
  • agent:main:discord:direct:1302991150763999302 → Discord DM session
  • agent:main:telegram:direct:7900865099 → Telegram DM session

So now your DMs are split properly instead of all collapsing together.

That part is fixed ✅

The remaining weird bit is just the native cron DM delivery bug on your current version. But session routing is now correct.

If you want, next I can give you the exact cron templates for:

  1. Daily Tech Market update
#
  1. Daily AI news update
  2. Daily OpenClaw X post update

Glad that helped! 🎉
If this fixed it, please right-click the solution message → Apps → ✅ Mark Solution.
This helps Answer Overflow index the solution for future users.

zinc glade
#

Now the crone should work as cron/reminder way right? Let's setup one for test

pale scarabBOT
#

Almost.

Your session routing is fixed now, but I still wouldn’t trust native Discord cron --announce on 2026.4.12 yet, because that was the broken part before.

So for a test right now, I’d use the working workaround path:

oc cron add \
  --name "Reminder test Discord" \
  --at "2m" \
  --session isolated \
  --message "Use the message tool to send exactly this Discord DM to target user:1302991150763999302 on channel discord: Reminder test worked ✅. After sending successfully, reply exactly NO_REPLY." \
  --no-deliver

Then you can run:

#
oc cron list

and either:

  • wait 2 minutes, or
  • force it with oc cron run <job-id>

So yes, cron scheduling/reminders work, but on your current build I’d use the workaround for Discord DM delivery until you update.

If you want, next I can give you:

  • a daily 10 AM Dhaka test
  • or the real Tech Market / AI News / OpenClaw X cron commands
zinc glade
#

My system and some part show Asia/Calcutta but my zone is Asia/Dhaka, how to set this permanently?

pale scarabBOT
#

Yep, set it in two layers:

1) Set OpenClaw’s user timezone permanently

oc config set agents.defaults.userTimezone Asia/Dhaka
oc config set agents.defaults.envelopeTimezone user

That makes OpenClaw use Asia/Dhaka for prompt/envelope time instead of falling back to host-local time.

2) Restart the container

docker restart openclaw-b8wu-openclaw-1

Important

If some places still show Asia/Calcutta after that, that means the Docker/container host timezone is still wrong.

#

In that case, set the container env to:

TZ=Asia/Dhaka

in your Docker Compose / container config, then recreate the container.

So short version:

  • agents.defaults.userTimezone = Asia/Dhaka
  • agents.defaults.envelopeTimezone = user
  • restart
  • if still wrong, fix Docker TZ

Docs:

idle turtleBOT
zinc glade
#

Alright, so my container and terminal command is different as you know.

Mine is oc and terminal command execution is different. what's mine now?

pale scarabBOT
#

Yep, for your setup the rule is:

  • Any openclaw ... command → use oc ...
  • Any Docker/container command → use normal docker ...

Because your wrapper is basically:

oc() { docker exec -it openclaw-b8wu-openclaw-1 openclaw "$@"; }

So for your timezone setup, your exact commands are:

oc config set agents.defaults.userTimezone Asia/Dhaka
oc config set agents.defaults.envelopeTimezone user
#
docker restart openclaw-b8wu-openclaw-1

Quick mental model

  • OpenClaw CLI inside container → oc ...
  • Restart container → docker restart openclaw-b8wu-openclaw-1
  • Edit Docker env / compose → normal Docker files, not oc

If you want, I can now rewrite all future commands in your exact oc style only.

zinc glade
#

So, if I start a new thread, then you wo't know my wrapper. What to tell you first so you can know?

pale scarabBOT
#

Yep, easiest is to tell me this at the top of a new thread:

I run OpenClaw in Docker.

Use:
oc() { docker exec -it openclaw-b8wu-openclaw-1 openclaw "$@"; }

So:
- use `oc ...` instead of `openclaw ...`
- for restarts, use `docker restart openclaw-b8wu-openclaw-1`

Short version

If you want it even shorter, just send:

#
My OpenClaw wrapper is:
oc = docker exec -it openclaw-b8wu-openclaw-1 openclaw

That’s enough for me to adapt all commands.

zinc glade
#

ALright. Ill go with the new thread now. Thanks from Miko and me.

pale scarabBOT
#

Sounds good. Glad we got the routing untangled 🙂

When you start the new thread, just paste your oc wrapper line first and we’ll pick it up from there.

And hi to Miko too 🦐

Glad that helped! 🎉
If this fixed it, please right-click the solution message → Apps → ✅ Mark Solution.
This helps Answer Overflow index the solution for future users.