Automation & Scheduling
Cron Jobs
Precise timing के साथ agent wakeups schedule करें। Cron jobs Gateway restarts में persist होते हैं और flexible scheduling patterns support करते हैं।
Schedule Types
| Type | विवरण | Example |
|---|---|---|
| Cron expression | Timezone के साथ Standard cron syntax | 0 7 * * * (daily at 7 AM) |
| Interval | Fixed intervals पर repeat | 30m, 2h, 1d |
| One-shot | एक specific time पर एक बार run करें | 2026-03-15T16:00:00Z |
Session Targets
- Main session, Agent के main conversation में system event के रूप में enqueue करें
- Isolated session, Main conversations को contaminate करने से बचाने के लिए एक dedicated session (
cron:<jobId>) में run करें
Delivery Modes
| Mode | विवरण |
|---|---|
| None | Silent execution (कोई output post नहीं) |
| Announce | Result को एक specific channel पर post back करें |
| Webhook | Result को एक external URL पर HTTP POST करें |
One-Shot Reminders
एक specific time के लिए reminder set करें। Agent जागता है, reminder process करता है, और optionally run करने के बाद job delete करता है।
Recurring Jobs
Cron expressions और timezone support के साथ repeating tasks schedule करें। Jobs अपना execution history track करते हैं (success, failure, timing)।
Webhooks
External services से events receive करें और उन्हें agents तक route करें।
Gmail Pub/Sub
Emails आने पर agent actions trigger करने के लिए Gmail के push notification system के साथ integrate करें:
- एक GCP Pub/Sub topic और subscription set up करें
- Gmail label filtering configure करें
- Push delivery को अपने webhook URL पर point करें
- Neotask messages receive करता है और agent events enqueue करता है
Custom Webhooks
HTTP endpoints register करें जो call होने पर agent turns trigger करते हैं। CI/CD pipelines, monitoring systems, या किसी भी service के साथ integrate करने के लिए उपयोगी जो HTTP requests भेज सकती है।
System Events
System events वे signals हैं जो processing के लिए एक agent को जगाते हैं:
- Immediate, Next heartbeat पर process करें
- Next heartbeat, अगले scheduled check-in के लिए queue करें
Reactive workflows के लिए system events का उपयोग करें, agents तब जागते हैं जब कुछ होता है बजाय fixed schedule के।
Heartbeat
Heartbeat एक periodic signal है (default ~15 seconds) जो agents को pending work process करने का opportunity देता है:
- नए system events check करें
- Queued messages process करें
- Pending automations run करें
Heartbeat per-agent enable, disable, या configure किया जा सकता है।
Hooks
Event-driven automation जो Gateway events के response में shell commands या scripts trigger करती है:
- On message, Message receive होने पर execute करें
- On agent turn, Agent message process करने से पहले या बाद में execute करें
- On channel event, Channel-specific events पर execute करें (join, leave, reaction)
Hooks Gateway host पर run होते हैं और event context data का access रखते हैं।
Use Cases
| Scenario | Solution |
|---|---|
| Daily morning briefing | 7 AM पर Cron job → agent overnight updates summarize करता है |
| Weekly report generation | हर Monday पर Cron job → agent report generate करता और email करता है |
| Email monitoring | Gmail webhook → agent incoming emails process करता है |
| Build notifications | CI/CD webhook → agent Discord पर build results announce करता है |
| Hourly data check | Interval-based cron → agent dashboard check करता है और anomalies पर alert करता है |
| Scheduled social posts | Cron job → agent optimal times पर content draft और post करता है |