惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
Google DeepMind News
Google DeepMind News
美团技术团队
大猫的无限游戏
大猫的无限游戏
H
Help Net Security
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
M
MIT News - Artificial intelligence
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - Franky
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Security Blog
Microsoft Security Blog
F
Fortinet All Blogs
A
About on SuperTechFans
Recent Announcements
Recent Announcements
D
Docker
Vercel News
Vercel News
Engineering at Meta
Engineering at Meta
腾讯CDC
Martin Fowler
Martin Fowler
阮一峰的网络日志
阮一峰的网络日志

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Cron & Scheduled Tasks in Garudust Agent — Autonomous Age...
Garudust · 2026-05-21 · via DEV Community

Most AI agents wait. They sit idle until a human types something, respond, then go back to waiting.

Garudust Agent can be different. With garudust-cron, you schedule tasks using standard cron syntax — the agent wakes up, runs a full LLM loop with all its tools, and goes back to sleep. No human required.

This post shows you exactly how to configure it, with the correct syntax pulled straight from the source.


How It Works

garudust-cron is a crate within the Garudust workspace. When a scheduled trigger fires, it calls agent.run(task) — the same code path as a user typing a message. The agent has access to all its configured tools: file read/write, terminal, RAG, web search, and anything else you've enabled.

Cron runs as part of garudust-server. There is no separate daemon.


Three Ways to Set Up Cron Jobs

1. config.yaml — Permanent, survives restarts

# ~/.garudust/config.yaml
cron:
  jobs:
    - schedule: "0 9 * * 1-5"   # weekdays at 09:00 (server timezone)
      task: "Write a morning briefing and append it to ~/briefing.md"

    - schedule: "0 18 * * 5"    # Fridays at 18:00
      task: "Summarise this week's git commits and save to ~/weekly.md"

Enter fullscreen mode Exit fullscreen mode

CronJob has exactly two fields: schedule and task. Nothing else.

schedule uses standard 5-field cron syntax:

┌─────── minute (059)
│ ┌───── hour (023)
│ │ ┌─── day of month (131)
│ │ │ ┌─ month (112)
│ │ │ │ ┌ day of week (06, Sun=0)
│ │ │ │ │
0 9 * * 1-5

Enter fullscreen mode Exit fullscreen mode

Timezone follows the server process — set your system timezone before starting garudust-server if needed.


2. CLI flag or environment variable — One-off / Docker

# CLI flag — comma-separated "cron_expr=task" pairs
garudust-server --cron-jobs "0 9 * * *=Write morning briefing,0 18 * * 5=Weekly summary"

# Or via environment variable in ~/.garudust/.env
GARUDUST_CRON_JOBS="0 9 * * *=Write morning briefing"

Enter fullscreen mode Exit fullscreen mode

These take precedence over config.yaml when both are set.


3. Runtime via chat — No restart needed

Once the server is running, you (or any admin) can create jobs live by asking the agent:

You:   Create a cron job that runs every day at 7am to check disk usage
       and send me an alert if any partition is above 80%.

Agent: [uses cron_create tool]
       Created cron job 'disk_check' with schedule: 0 0 7 * * *

Enter fullscreen mode Exit fullscreen mode

Note: cron_create uses 6-field cron syntax (seconds first): sec min hour dom month dow
This is different from the 5-field syntax in config.yaml.

Format Where used Example
5-field config.yaml, --cron-jobs, env var 0 9 * * 1-5
6-field cron_create tool at runtime 0 0 9 * * 1-5

Runtime jobs are not persisted — they disappear on server restart. Add them to config.yaml for permanent schedules.

Manage runtime jobs:

You:   List all active cron jobs.
Agent: - [disk_check]  schedule: 0 0 7 * * *  task: Check disk usage...  created: 2025-05-21 07:00 UTC

You:   Delete the disk_check job.
Agent: Cron job 'disk_check' removed.

Enter fullscreen mode Exit fullscreen mode


Memory Maintenance (Bonus)

CronConfig has two extra fields specifically for automatic memory housekeeping:

cron:
  jobs:
    - schedule: "0 9 * * *"
      task: "Morning briefing"

  # Consolidate and deduplicate memory entries
  memory_consolidation: "0 3 * * *"   # daily at 03:00

  # Expire stale memory entries (based on memory_expiry settings)
  memory_expiry: "0 4 * * 0"          # weekly on Sunday at 04:00

Enter fullscreen mode Exit fullscreen mode

These run lightweight maintenance tasks — no LLM call required.


Practical Examples

Morning Briefing

cron:
  jobs:
    - schedule: "0 8 * * 1-5"
      task: >
        Write a morning briefing covering: (1) any new files in ~/inbox/,
        (2) a summary of yesterday's ~/logs/app.log errors,
        (3) today's date and day of week.
        Save the result to ~/briefing/$(date +%Y-%m-%d).md.

Enter fullscreen mode Exit fullscreen mode

Log Monitoring

cron:
  jobs:
    - schedule: "*/15 * * * *"   # every 15 minutes
      task: >
        Check /var/log/app/error.log for entries in the last 15 minutes.
        If there are more than 10 errors, append a summary to ~/alerts/errors.log.

Enter fullscreen mode Exit fullscreen mode

Weekly Git Summary

cron:
  jobs:
    - schedule: "0 17 * * 5"   # Fridays at 17:00
      task: >
        Run git log --since="1 week ago" --oneline in ~/project/,
        summarise what changed by area, and save to ~/reports/weekly.md.

Enter fullscreen mode Exit fullscreen mode

Sending Results to Telegram

Cron jobs have no built-in delivery mechanism — the agent writes to files or uses tools. To send to Telegram, write it into the task prompt:

cron:
  jobs:
    - schedule: "0 9 * * *"
      task: >
        Write a morning briefing (top 3 priorities for today, weather summary).
        Then send it to Telegram chat ID 123456789 using the send_message tool.

Enter fullscreen mode Exit fullscreen mode

The agent calls send_message itself. The chat ID must be hardcoded in the task or retrievable from a file the agent can read.


Disabling Cron Tools

If you want to prevent the agent from creating or deleting jobs at runtime, disable the toolset:

disabled_toolsets: [cron]

Enter fullscreen mode Exit fullscreen mode

Config-file jobs still run — only the cron_create / cron_list / cron_delete runtime tools are disabled.


Summary

config.yaml --cron-jobs / env var Runtime (cron_create)
Cron syntax 5-field 5-field 6-field (sec first)
Persists across restarts
Requires restart to activate
cron_list shows it

Start with config.yaml for anything you want running reliably. Use runtime jobs for experiments or tasks you only need for the current server session.


Garudust AgentGitHub · Releases