Cron Jobs

Schedule recurring tasks by chatting with your bot — no crontab editing required.

How Cron Jobs Work

Cron jobs in ClawBlitz are managed entirely through conversation with your OpenClaw bot. When you ask your bot to do something on a schedule, it uses the built-in openclaw cron CLI tool behind the scenes. You never need to write cron expressions yourself — just describe what you want in plain language.

Cron data is stored on persistent storage, so all scheduled jobs survive restarts and updates.

Creating a Cron Job

Simply tell your bot what you want it to do and how often. Here are some examples of messages you can send:

"Check my email every hour and summarize anything important"
"Every morning at 9am, pull my Notion tasks and send me a daily briefing"
"Post a tweet with a tech tip every day at 2pm"
"Every Friday at 5pm, create a weekly summary of my GitHub PRs"

Your bot will interpret the schedule, generate the appropriate cron expression, and register it using the openclaw cron add command.

Under the Hood

When your bot creates a cron job, it runs a command like this internally:

# Add a cron job that runs every hour
openclaw cron add --schedule "0 * * * *" --prompt "Check my email inbox and summarize new messages"

Example cron payloads the bot generates:

# Every hour --schedule "0 * * * *" --prompt "Check email for new messages" # Every day at 9:00 AM UTC --schedule "0 9 * * *" --prompt "Pull Notion tasks and create a briefing" # Every Monday at 8:00 AM UTC --schedule "0 8 * * 1" --prompt "Generate weekly project status report" # Every 30 minutes --schedule "*/30 * * * *" --prompt "Check Slack for unanswered questions"

All times are in UTC. The bot will confirm the schedule and next run time when it creates the job.

Managing Cron Jobs

You can manage your cron jobs by chatting with your bot or by asking it to run the CLI commands directly:

List all cron jobs

Ask your bot: "Show me all my scheduled jobs" or:

openclaw cron list

Remove a cron job

Ask your bot: "Remove the email checking cron job" or:

openclaw cron remove --id <job-id>

The bot will show you a list of jobs and confirm which one to remove before deleting it.

Persistence

Cron jobs are stored on persistent storage. This means:

  • Jobs survive restarts and updates
  • Updating your system prompt or API key (which triggers a restart) will not affect scheduled jobs
  • Cron data counts toward your storage usage, but is typically very small (a few KB per job)

Limitations

No environment variables in cron context

Cron jobs run in a separate execution context that does not have access to environment variables set during interactive sessions. If your task depends on specific env vars, it may not work as expected when run as a cron job. API keys configured in the ClawBlitz dashboard (for integrations like Notion, GitHub, etc.) are available.

OAuth skills need one-time setup

Skills that require OAuth (like Gmail) need a one-time setup before they work in cron jobs. Complete the OAuth flow externally — create credentials in Google Cloud Console, authorize in your browser, and provide the credentials to your bot via chat. Once authenticated, the skill works in both interactive sessions and cron jobs without needing to re-authorize.

Execution timeout

Each cron job execution has a timeout. If your task takes too long, it will be terminated. Keep scheduled tasks focused and concise for best results.

Tips for Effective Cron Jobs

  • Be specific in your prompt. Instead of "check things," say "check my Notion inbox for tasks tagged urgent and summarize them."
  • Start with longer intervals. Test with hourly or daily before going to every 5 minutes. Frequent jobs consume more API credits.
  • Check your cron list periodically. Ask your bot to list scheduled jobs and remove any you no longer need.
  • Remember UTC timing. All cron schedules use UTC. Adjust accordingly for your local timezone.