Schedule tasks with time-based or event-driven triggers so recurring automation and event-aware workflows can run without keeping the caller blocked inline.
When you describe an event-based goal like "notify me when I get 10 new leads", the scheduler automatically creates two linked tasks:
Sensor task — polls the configured integration at regular intervals using
optimized count queries (e.g. SELECT COUNT() FROM Lead) instead of fetching full records.
Asserts delta metrics into the Logic Cell for threshold evaluation.
Conditional task — evaluates preconditions against Logic Cell metrics before executing the action. Reschedules itself if the threshold hasn't been met yet.
// Schedule a task to run daily { "name": "data-grout@1/scheduler.create@1", "arguments": { "goal": "send me a summary of new leads every morning", "schedule": "daily", "tool": "salesforce@v1/soql@v1", "tool_args": { "query": "SELECT Id, Name, Email FROM Lead WHERE CreatedDate = TODAY" } } } // Event-driven: run when a threshold is met { "name": "data-grout@1/scheduler.create@1", "arguments": { "goal": "notify me when I get 10 new leads" } }