Scheduled Tasks (Cron)
Kyber has a built-in cron scheduler for recurring tasks. Jobs run automatically and can optionally deliver their output to a chat channel.
Adding a job
# Run every 5 minutes
kyber cron add --name "check-news" --message "Check tech news and summarize" --every 300
# Run daily at 9am
kyber cron add --name "morning-brief" --message "Give me a morning briefing" --cron "0 9 * * *"Delivering to a channel
Send the output to a specific chat:
kyber cron add \
--name "daily-digest" \
--message "Summarize today's important events" \
--cron "0 18 * * *" \
--deliver \
--to "YOUR_CHAT_ID" \
--channel telegramManaging jobs
# List all jobs
kyber cron list
# Remove a job
kyber cron remove <job-id>Cron syntax
Standard cron expressions are supported:
┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-6, Sun=0)
│ │ │ │ │
* * * * *Examples:
| Expression | Meaning |
|---|---|
*/5 * * * * | Every 5 minutes |
0 9 * * * | Daily at 9:00 AM |
0 9 * * 1-5 | Weekdays at 9:00 AM |
0 */6 * * * | Every 6 hours |
0 0 1 * * | First of every month at midnight |
How it runs
Cron jobs are managed by the gateway process. When the gateway starts, it loads all configured jobs and schedules them. Each job triggers an agent message as if a user sent it.