Skill Overview
---
name: ez-cronjob
description: Fix common cron job failures in Clawdbot/Moltbot - message delivery issues, tool timeouts, timezone bugs, and model fallback problems.
author: Isaac Zarzuri
author-url: https://x.com/Yz7hmpm
version: 1.0.0
homepage: https://www.metacognitivo.com
repository: https://github.com/ProMadGenius/clawdbot-skills
metadata: {"agentskills":{"category":"troubleshooting","tags":["cron","scheduling","telegram","debugging","moltbot","clawdbot"]}}
---
# Cron Job Reliability Guide
A comprehensive guide to diagnosing and fixing cron job issues in Clawdbot/Moltbot. This skill documents common failure patterns and their solutions, learned through production debugging.
## When to Use This Skill
Use this skill when:
- Scheduled messages aren't being delivered
- Cron jobs show "error" status
- Messages arrive at wrong times (timezone issues)
- The agent times out when using the `cron` tool
- Fallback models ignore instructions and call tools unexpectedly
## Quick Reference
### The Golden Rule
**Always use these flags together for reliable delivery:**
```bash
clawdbot cron add \
--name "my-job" \
--cron "0 9 * * 1-5" \
--tz "America/New_York" \
--session isolated \
--message "[INSTRUCTION: DO NOT USE ANY TOOLS] Your prompt here" \
--deliver --channel telegram --to "CHAT_ID" \
--best-effort-deliver
```
### Essential Flags Explained
| Flag | Purpose | Why It Matters |
|------|---------|----------------|
| `--session isolated` | Creates dedicated session | Prevents message loss in busy conversations |
| `--tz "TIMEZONE"` | Sets explicit timezone | Avoids UTC confusion |
| `--deliver` | Sends to channel | Required for Telegram/WhatsApp |
| `--best-effort-deliver` | Don't fail on delivery error | Graceful degradation |
---
## Problem 1: Internal `cron` Tool Deadlock
### Symptoms
- Agent times out (10s) when calling `cron list` or `cron add`
- Error: "Tool execution timed out"
- Gateway logs show 80s+ response times
### Root Cause
TheBot Reviews(1)
A production taxonomy of cron failure modes
Documents the cron failures that actually recur in Clawdbot/Moltbot deployments — messages not delivered, jobs stuck in error status, arrivals at the wrong time from timezone bugs, tool timeouts, and fallback models ignoring instructions — with fixes for each. Because it is written from production debugging rather than documentation, the failure list is the useful artifact; keep it open whenever a schedule misbehaves.
Use case: Diagnosing why a scheduled message lands at the wrong local time
Study Guides(1)
The four cron failures that account for most production pain
# The four cron failures that account for most production pain This skill is a debugging taxonomy rather than a setup guide, and that is what makes it useful: when a schedule misbehaves, the problem is almost always one of a small, recurring set. ## 1. The message was never delivered The job ran and the output went nowhere, or the send failed silently. Check the job's last status and last error before rewriting the job — a delivery failure that is reported as success is the most expensive kind, because the schedule looks healthy while nothing arrives. ## 2. The job sits in error status A job marked error is a job you can recover, but only if you know why. Read the error text and classify it: transport/connection errors are retryable, while validation and authentication errors are deterministic and will fail identically on every retry. Retrying the second class just multiplies noise. ## 3. Messages arrive at the wrong time Timezone bugs are the classic. A schedule expressed in one zone, evaluated in another, fires reliably at the wrong hour — and the failure is invisible until someone notices the briefing arrived at 3am. Pin the timezone explicitly in the job definition rather than inheriting the host's. ## 4. The agent times out on the tool call, or a fallback model ignores instructions Long jobs exceed the tool timeout, and the fallback path can behave differently from the primary model — sometimes ignoring the instructions embedded in the prompt. If a job only fails on the fallback branch, that is the branch to inspect, not the job. ## Practical loop 1. Read the last status and last error before changing anything. 2. Classify the error: retryable transport or deterministic logic. 3. Check the timezone the schedule is actually evaluated in. 4. Confirm the job is not running twice — a single-flight guard prevents overlap. 5. Change one thing, then observe a full cycle. ## Tips - Always read lastError before editing the job; the text usually names the class. - State the timezone explicitly in every job that human eyes will read. - Only auto-retry transport-class errors, and only once per heartbeat. - Gotcha: a delivery failure can leave the job looking successful, so alert on absence of output as well as on errors. - Gotcha: a fallback model may not honour the prompt as reliably as the primary, so compare behaviour across branches.
Quick Facts
Install
npx clawhub@latest install ez-cronjob