Quick Start
Cron Schedules
Cron schedules run agents at fixed intervals using standard cron expressions.Creating a Cron Schedule
Cron Expression Format
Standard five-field Unix cron syntax:Timezone
Timezones use IANA identifiers. Some common values:How Cron Execution Works
- You create a schedule — orchagent registers a Cloud Scheduler job
- At the scheduled time, the platform triggers the agent
- Agent runs in a cloud sandbox with your stored LLM keys and workspace secrets
- Run result is logged to your workspace run history
- Next execution time is calculated and displayed
Webhook Schedules
Webhook schedules let external systems trigger agent execution via HTTP POST.Creating a Webhook
Calling a Webhook
External systems (GitHub Actions, Zapier, Stripe, etc.) send a POST request to the webhook URL:input_data and passed to the agent.
Webhook Payload Format
Request: Send a JSON object in the POST body. The webhook accepts any valid JSON:input_data (request body takes precedence for overlapping keys). If no body is sent, the agent receives only the schedule’s default input. Non-object JSON values (strings, arrays, numbers) are wrapped as {"data": <value>}.
Response:
Webhook Security
The URL itself contains the secret token — no separate authentication headers needed. Treat the webhook URL like an API key:- Don’t commit it to source control
- Store it in your CI/CD secrets manager
- Regenerate by deleting and recreating the schedule if compromised
Managing Schedules
List Schedules
Update a Schedule
Updating cron or timezone automatically recalculates the next execution time and updates the Cloud Scheduler job. Using
--agent-version automatically disables auto-update (pins the schedule to the specified version).Delete a Schedule
Trigger Manually
Test a schedule by triggering it immediately:View Schedule Details
--json for machine-readable output.
View Run History
Version Management
By default, schedules auto-update when you publish a new version of the agent. This means your cron jobs and webhooks always run the latest code without manual intervention.Auto-Update (Default)
When you runorch publish, all enabled schedules for that agent in the same workspace are automatically updated to the new version. You’ll see this in the schedule events:
Pinning a Version
If you need a schedule to stay on a specific version (e.g., for stability or testing), pin it at creation time:Switching Versions
You can switch a schedule to any available version of the same agent:--agent-version automatically disables auto-update, since explicitly choosing a version implies you want to control which version runs. A version_updated event is logged in the schedule’s event timeline.
To re-enable auto-update later:
Workspace Secrets
If your agent needs external API keys or credentials at runtime (e.g., a database connection string, a third-party API key), you must:- Add the secrets to your workspace in the dashboard
- Declare them in your agent’s
orchagent.json:
required_secrets are injected as environment variables into the sandbox at runtime. Secrets not listed will not be available, even if they exist in your workspace.
For more details, see the manifest reference and workspace secrets guide.
LLM Credentials
Scheduled runs use LLM keys from your workspace secrets vault:- If the schedule has a
--providerset, that provider’s key is used - Otherwise, the agent’s default provider is used
- LLM keys must exist in the vault before creating the schedule (e.g.,
ANTHROPIC_API_KEY,OPENAI_API_KEY)
Failure Handling
orchagent tracks consecutive schedule failures and can automatically disable schedules that fail repeatedly.Failure Streaks
Each schedule tracks its consecutive failure count. When a schedule fails, the counter increments. When it succeeds, the counter resets to zero. If the failure count reaches the threshold (default: 10, configurable 1-100), the schedule is automatically disabled to prevent runaway failures.Re-enabling a Disabled Schedule
When you re-enable an auto-disabled schedule, the failure counter resets to zero:Fix the underlying issue before re-enabling. The schedule will auto-disable again if failures continue.
Alert Webhooks
Get notified when schedules fail repeatedly. Configure an alert webhook URL via the API:- Warning — when
consecutive_failuresreachesalert_on_failure_count(default: 3) - Auto-disable — when the schedule is automatically disabled
Webhook Idempotency
Webhook triggers support idempotency to prevent duplicate executions. Pass anidempotency-key header:
Examples
Daily Report
Hourly Monitoring
GitHub Webhook Integration
Weekly Cleanup
Test Before Automating
Permissions
Limits
Scheduling is included on Pro, Team, and Enterprise plans. Schedule limits depend on your plan tier. Agent execution time counts toward your workspace compute usage.Troubleshooting
Schedule not executing?- Check that the schedule is enabled:
orch schedule list - Verify your LLM keys are configured in the workspace
- Try a manual trigger to see the error:
orch schedule trigger <id>
- Verify the URL is correct (the secret is part of the URL)
- Check the external system is sending
Content-Type: application/json - Webhook URLs are public — no firewall allowlisting needed
- The schedule hit its consecutive failure threshold and was automatically paused
- Check recent failures:
orch schedule info <id> - Fix the root cause, then re-enable:
orch schedule update <id> --enable
- Your agent probably uses workspace secrets but doesn’t declare them in
orchagent.json - Add
"required_secrets": ["SECRET_NAME"]to yourorchagent.jsonand republish - See Workspace Secrets above
- Use IANA identifiers (e.g.,
America/New_York), not abbreviations likeEST - Update with:
orch schedule update <id> --timezone "America/New_York"