Quick Start
Features
Cron Scheduling
Schedule recurring tasks with cron expressions
Webhook Triggers
Trigger jobs via secure webhook endpoints
Manual Execution
Manually trigger jobs on-demand
Execution History
Track job execution history and status
List Jobs
Retrieve all jobs with optional filtering:enabled(bool, optional): Filter by enabled status (True/False)trigger_type(str, optional): Filter by trigger type: ‘cron’, ‘webhook’, or ‘manual’
Get Job
Retrieve a specific job by ID:job_id(str, required): Job ID (format:job_<uuid>)
Create Job
Cron Job
Create a job that runs on a schedule:Webhook Job
Create a job triggered via webhook:Manual Job
Create a job for manual triggering only:job_data(dict, required): Job configurationname(str, required): Job nametrigger_type(str, required): ‘cron’, ‘webhook’, or ‘manual’cron_schedule(str): Cron expression (required for cron trigger)cron_timezone(str): Timezone for cron (default: ‘UTC’)planning_mode(str): ‘on_the_fly’, ‘predefined_agent’, ‘predefined_team’, or ‘predefined_workflow’entity_type(str): ‘agent’ or ‘team’ (for predefined modes)entity_id(str): Entity UUID (for predefined modes)prompt_template(str): Prompt with placeholderssystem_prompt(str, optional): System prompt overrideexecutor_type(str): ‘auto’, ‘specific_queue’, or ‘environment’worker_queue_name(str): Worker queue name (for specific_queue)environment_name(str): Environment name (for environment executor)config(dict, optional): Additional configurationexecution_environment(dict, optional): Execution environment configenabled(bool): Whether job is enabled (default: True)description(str, optional): Job description
For webhook jobs, save the
webhook_url and webhook_secret - the secret is only shown once at creation time.Update Job
Update an existing job (partial update):job_id(str, required): Job IDjob_data(dict, required): Fields to updatename(str): Job namedescription(str): Job descriptionenabled(bool): Whether job is enabledcron_schedule(str): Cron expressioncron_timezone(str): Timezoneplanning_mode(str): Planning modeentity_type(str): Entity typeentity_id(str): Entity IDprompt_template(str): Prompt templatesystem_prompt(str): System promptexecutor_type(str): Executor typeworker_queue_name(str): Worker queue nameenvironment_name(str): Environment nameconfig(dict): Configurationexecution_environment(dict): Execution environment
Delete Job
Delete a job and its Temporal Schedule:job_id(str, required): Job ID
Job Execution
Manual Trigger
Manually trigger a job execution:job_id(str, required): Job IDparameters(dict, optional): Parameters to substitute in prompt templateconfig_override(dict, optional): Config overrides for this execution
Enable/Disable Job
Enable or disable a job:job_id(str, required): Job ID
Get Execution History
Retrieve execution history for a job:job_id(str, required): Job IDlimit(int): Max executions to return (default: 50)offset(int): Number to skip (default: 0)
Webhook Triggers
Trigger via Webhook
Trigger a job using its webhook endpoint:webhook_path(str, required): Unique webhook identifier from webhook URLpayload(dict, required): Webhook payloadparameters(dict): Parameters for prompt templateconfig_override(dict, optional): Config overridesmetadata(dict, optional): Additional metadata
signature(str, required): HMAC-SHA256 signature (hex)
Complete Example
Here’s a complete example of creating and managing a scheduled job:Error Handling
Handle job-related errors:Cron Schedule Examples
Common cron schedule patterns:Best Practices
Job Design
- Idempotent Jobs: Design jobs to be safely re-runnable
- Clear Naming: Use descriptive names indicating purpose and frequency
- Reasonable Timeouts: Set appropriate execution timeouts
- Error Handling: Include error handling in prompt templates
Scheduling
- Timezone Awareness: Always specify timezone explicitly
- Off-Peak Hours: Schedule heavy jobs during low-traffic periods
- Avoid Overlap: Ensure jobs don’t overlap if they access shared resources
- Test Manually First: Test with manual trigger before enabling cron
Webhook Security
- Always Validate Signatures: Never trust unsigned webhooks
- Secure Secret Storage: Store webhook secrets securely (env vars, secrets manager)
- Rate Limiting: Implement rate limiting on webhook endpoints
- Audit Logs: Monitor webhook trigger patterns
Monitoring
- Check Execution History: Regularly review execution status
- Set Up Alerts: Alert on consecutive failures
- Track Duration: Monitor job duration trends
- Disable Failed Jobs: Temporarily disable repeatedly failing jobs
API Reference
Next Steps
Agents Service
Create agents for job execution
Teams Service
Use teams in jobs
Workers Service
Configure worker queues
Environments Service
Manage execution environments