#Heartbeat frequency

1 messages Β· Page 1 of 1 (latest)

torn needle
#

Hey Krill! I don’t have any heartbeat config line in my clawdbot.json file, I want to change the frequency from 30 minutes to 120 minutes, how do I do that?

ornate harnessBOT
#

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

dusky flintBOT
# torn needle Hey Krill! I don’t have any heartbeat config line in my clawdbot.json file, I wa...

I'll help you add the heartbeat config! Since you don't have any heartbeat config yet, you'll need to add the agents.defaults.heartbeat section to your ~/.clawdbot/clawdbot.json file.

Add this to your config:

{
  "agents.defaults.heartbeat": {
    "every": "120m",
    "target": "last",
    "ackMaxChars": 300
  }
}

Key points:

  • every: "120m" β€” This sets the heartbeat interval to 120 minutes (2 hours)
  • target: "last" β€” Sends heartbeats to the last active session
#
  • ackMaxChars: 300" β€” Max characters for acknowledgment messages

After adding this, you can either:

  1. Hot reload (no restart needed) if you have gateway.reload.mode set to "hot" in your config
  2. Restart the gateway if you don't have hot reload configured

Would you like me to help you check if you have hot reload enabled, or do you need guidance on applying the config?

torn needle
#

I want my target to be my DM message with my bot not the last active session, is that feasible?

dusky flintBOT
# torn needle I want my target to be my DM message with my bot not the last active session, is...

Yes, that's feasible! Instead of "last", you can target a specific channel (including your DM with the bot).

Use your DM channel ID as the target:

{
  "agents.defaults.heartbeat": {
    "every": "120m",
    "target": "1460889526812803255",
    "ackMaxChars": 300
  }
}

To find your DM channel ID:

  1. Open Discord in a browser/desktop client
  2. Enable Developer Mode (Settings β†’ Advanced β†’ Developer Mode)
#
  1. Right-click on your DM thread with the bot β†’ "Copy ID"

The DM channel ID will be a 18-19 digit number like the example above.

Note: The heartbeat will send to that specific DM channel regardless of which session is active. Just make sure you use the channel ID, not your user ID.

Would you like help applying this config?

torn needle
#

I’m on telegram and not on discord

dusky flintBOT
# torn needle I’m on telegram and not on discord

No problem! For Telegram, you can target your DM with the bot using the Telegram chat ID.

Find your Telegram chat ID:

  1. Check the gateway logs when you message the bot β€” it should show the chat ID
  2. Or forward a message from the bot to @username_to_id_bot to get the ID

The chat ID for Telegram DMs is typically a negative number (like -123456789).

Once you have it, use:

{
  "agents.defaults.heartbeat": {
    "every": "120m",
    "target": "-123456789",
    "ackMaxChars": 300
#
  }
}

Replace -123456789 with your actual Telegram chat ID.

Do you know your Telegram chat ID, or do you need help finding it?