{"slug": "cron-scheduled-tasks-in-garudust-agent-autonomous-agents-that-run-without-you", "title": "Cron & Scheduled Tasks in Garudust Agent — Autonomous Agents That Run Without You", "summary": "The Garudust Agent can be configured to run autonomously using standard cron syntax, executing full AI agent loops with all its tools without requiring human input. Cron jobs are defined in the `config.yaml` file, via CLI flags, or environment variables, and can also be created dynamically by asking the agent at runtime, though runtime jobs are not persisted across server restarts. The system supports additional scheduled maintenance tasks like memory consolidation and expiry, and the agent can use its tools (such as file operations or messaging) to deliver results.", "body_md": "Most AI agents wait. They sit idle until a human types something, respond, then go back to waiting.\n\nGarudust Agent can be different. With `garudust-cron`\n\n, 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.\n\nThis post shows you exactly how to configure it, with the correct syntax pulled straight from the source.\n\n## How It Works\n\n`garudust-cron`\n\nis a crate within the Garudust workspace. When a scheduled trigger fires, it calls `agent.run(task)`\n\n— 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.\n\nCron runs as part of `garudust-server`\n\n. There is no separate daemon.\n\n## Three Ways to Set Up Cron Jobs\n\n### 1. `config.yaml`\n\n— Permanent, survives restarts\n\n```\n# ~/.garudust/config.yaml\ncron:\n  jobs:\n    - schedule: \"0 0 9 * * 1-5\"   # weekdays at 09:00 (server timezone)\n      task: \"Write a morning briefing and append it to ~/briefing.md\"\n\n    - schedule: \"0 0 18 * * 5\"    # Fridays at 18:00\n      task: \"Summarise this week's git commits and save to ~/weekly.md\"\n```\n\n`CronJob`\n\nhas exactly two fields: `schedule`\n\nand `task`\n\n. Nothing else.\n\n`schedule`\n\nuses **6-field** cron syntax (seconds first):\n\n```\n┌───────── second (0–59)\n│ ┌─────── minute (0–59)\n│ │ ┌───── hour (0–23)\n│ │ │ ┌─── day of month (1–31)\n│ │ │ │ ┌─ month (1–12)\n│ │ │ │ │ ┌ day of week (0–6, Sun=0)\n│ │ │ │ │ │\n0 0 9 * * 1-5\n```\n\nTimezone follows the server process — set your system timezone before starting `garudust-server`\n\nif needed.\n\n### 2. CLI flag or environment variable — One-off / Docker\n\n```\n# CLI flag — comma-separated \"cron_expr=task\" pairs\ngarudust-server --cron-jobs \"0 0 9 * * *=Write morning briefing,0 0 18 * * 5=Weekly summary\"\n\n# Or via environment variable in ~/.garudust/.env\nGARUDUST_CRON_JOBS=\"0 0 9 * * *=Write morning briefing\"\n```\n\nThese take precedence over `config.yaml`\n\nwhen both are set.\n\n### 3. Runtime via chat — No restart needed\n\nOnce the server is running, you (or any admin) can create jobs live by asking the agent:\n\n```\nYou:   Create a cron job that runs every day at 7am to check disk usage\n       and send me an alert if any partition is above 80%.\n\nAgent: [uses cron_create tool]\n       Created cron job 'disk_check' with schedule: 0 0 7 * * *\n```\n\nNote:`cron_create`\n\nuses6-fieldcron syntax (seconds first):`sec min hour dom month dow`\n\nSame format as`config.yaml`\n\n.\n\n| Format | Where used | Example |\n|---|---|---|\n| 6-field | everywhere (`config.yaml` , `--cron-jobs` , env var, `cron_create` ) |\n`0 0 9 * * 1-5` |\n\nRuntime jobs are **not persisted**— they disappear on server restart. Add them to `config.yaml`\n\nfor permanent schedules.**Manage runtime jobs:**\n\n```\nYou:   List all active cron jobs.\nAgent: - [disk_check]  schedule: 0 0 7 * * *  task: Check disk usage...  created: 2025-05-21 07:00 UTC\n\nYou:   Delete the disk_check job.\nAgent: Cron job 'disk_check' removed.\n```\n\n## Memory Maintenance (Bonus)\n\n`CronConfig`\n\nhas two extra fields specifically for automatic memory housekeeping:\n\n```\ncron:\n  jobs:\n    - schedule: \"0 0 9 * * *\"\n      task: \"Morning briefing\"\n\n  # Consolidate and deduplicate memory entries\n  memory_consolidation: \"0 0 3 * * *\"   # daily at 03:00\n\n  # Expire stale memory entries (based on memory_expiry settings)\n  memory_expiry: \"0 0 4 * * 0\"          # weekly on Sunday at 04:00\n```\n\nThese run lightweight maintenance tasks — no LLM call required.\n\n## Practical Examples\n\n### Morning Briefing\n\n```\ncron:\n  jobs:\n    - schedule: \"0 0 8 * * 1-5\"\n      task: >\n        Write a morning briefing covering: (1) any new files in ~/inbox/,\n        (2) a summary of yesterday's ~/logs/app.log errors,\n        (3) today's date and day of week.\n        Save the result to ~/briefing/$(date +%Y-%m-%d).md.\n```\n\n### Log Monitoring\n\n```\ncron:\n  jobs:\n    - schedule: \"0 */15 * * * *\"   # every 15 minutes\n      task: >\n        Check /var/log/app/error.log for entries in the last 15 minutes.\n        If there are more than 10 errors, append a summary to ~/alerts/errors.log.\n```\n\n### Weekly Git Summary\n\n```\ncron:\n  jobs:\n    - schedule: \"0 0 17 * * 5\"   # Fridays at 17:00\n      task: >\n        Run git log --since=\"1 week ago\" --oneline in ~/project/,\n        summarise what changed by area, and save to ~/reports/weekly.md.\n```\n\n### Sending Results to Telegram\n\nCron 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:\n\n```\ncron:\n  jobs:\n    - schedule: \"0 0 9 * * *\"\n      task: >\n        Write a morning briefing (top 3 priorities for today, weather summary).\n        Then send it to Telegram chat ID 123456789 using the send_message tool.\n```\n\nThe agent calls `send_message`\n\nitself. The chat ID must be hardcoded in the task or retrievable from a file the agent can read.\n\n## Disabling Cron Tools\n\nIf you want to prevent the agent from creating or deleting jobs at runtime, disable the toolset:\n\n```\ndisabled_toolsets: [cron]\n```\n\nConfig-file jobs still run — only the `cron_create`\n\n/ `cron_list`\n\n/ `cron_delete`\n\nruntime tools are disabled.\n\n## Summary\n\n`config.yaml` |\n`--cron-jobs` / env var |\nRuntime (`cron_create` ) |\n|\n|---|---|---|---|\n| Cron syntax | 6-field | 6-field | 6-field |\n| Persists across restarts | ✅ | ❌ | ❌ |\n| Requires restart to activate | ✅ | ✅ | ❌ |\n`cron_list` shows it |\n❌ | ❌ | ✅ |\n\nStart with `config.yaml`\n\nfor anything you want running reliably. Use runtime jobs for experiments or tasks you only need for the current server session.", "url": "https://wpnews.pro/news/cron-scheduled-tasks-in-garudust-agent-autonomous-agents-that-run-without-you", "canonical_source": "https://dev.to/garudust/cron-scheduled-tasks-in-garudust-autonomous-agents-that-run-without-you-5ecg", "published_at": "2026-05-21 07:17:45+00:00", "updated_at": "2026-05-21 07:32:28.678606+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence", "large-language-models", "open-source", "autonomous-vehicles"], "entities": ["Garudust Agent", "garudust-cron", "garudust-server", "config.yaml", "CronJob"], "alternates": {"html": "https://wpnews.pro/news/cron-scheduled-tasks-in-garudust-agent-autonomous-agents-that-run-without-you", "markdown": "https://wpnews.pro/news/cron-scheduled-tasks-in-garudust-agent-autonomous-agents-that-run-without-you.md", "text": "https://wpnews.pro/news/cron-scheduled-tasks-in-garudust-agent-autonomous-agents-that-run-without-you.txt", "jsonld": "https://wpnews.pro/news/cron-scheduled-tasks-in-garudust-agent-autonomous-agents-that-run-without-you.jsonld"}}