← All tools

Scheduler

Schedule tasks with time-based or event-driven triggers so recurring automation and event-aware workflows can run without keeping the caller blocked inline.

Scheduler — 3 tools

  • scheduler.create — Create scheduled tasks from natural language goals. Supports cron-like time schedules and event-driven triggers (e.g. "when I get 10 new leads"). Auto-decomposes event goals into sensor + conditional task pairs
  • scheduler.list — View all active, completed, and pending scheduled tasks with their status, next run time, and execution history
  • scheduler.cancel — Cancel a scheduled task by ID, stopping future executions

Event-driven sensor pipeline

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.

Example

// 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"
  }
}

Composes with

Scheduled tasks can execute any tool or workflow — combine with Toolsmith-forged queries, Flow plans, or Prism refractions. Event-driven sensors use Logic for threshold evaluation.