Automation & Scheduling

Cron Jobs

Precise timing के साथ agent wakeups schedule करें। Cron jobs Gateway restarts में persist होते हैं और flexible scheduling patterns support करते हैं।

Schedule Types

TypeविवरणExample
Cron expressionTimezone के साथ Standard cron syntax0 7 * * * (daily at 7 AM)
IntervalFixed intervals पर repeat30m, 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विवरण
NoneSilent execution (कोई output post नहीं)
AnnounceResult को एक specific channel पर post back करें
WebhookResult को एक 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 करें:

  1. एक GCP Pub/Sub topic और subscription set up करें
  2. Gmail label filtering configure करें
  3. Push delivery को अपने webhook URL पर point करें
  4. 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

ScenarioSolution
Daily morning briefing7 AM पर Cron job → agent overnight updates summarize करता है
Weekly report generationहर Monday पर Cron job → agent report generate करता और email करता है
Email monitoringGmail webhook → agent incoming emails process करता है
Build notificationsCI/CD webhook → agent Discord पर build results announce करता है
Hourly data checkInterval-based cron → agent dashboard check करता है और anomalies पर alert करता है
Scheduled social postsCron job → agent optimal times पर content draft और post करता है