Run your Streamline automations automatically on a schedule using cron expressions. Perfect for recurring tasks like daily reports, data synchronization, and monitoring.
Streamline scheduling provides:
- Cron Expressions: Standard cron syntax for flexible scheduling
- Timezone Support: Run automations in any timezone
- Enable/Disable: Toggle schedules without deleting them
- Next Run Time: See when your automation will run next
# Schedule to run daily at 9 AM UTC
aitronos streamline schedule set <automation-id> \
--cron "0 9 * * *" \
--timezone "UTC"
# Schedule to run every hour
aitronos streamline schedule set <automation-id> \
--cron "0 * * * *"
# Schedule to run every Monday at 8 AM EST
aitronos streamline schedule set <automation-id> \
--cron "0 8 * * 1" \
--timezone "America/New_York"curl -X POST "https://api.aitronos.com/v1/streamline/automations/{automation_id}/schedule" \
-H "Authorization: Bearer $FREDDY_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"cron_expression": "0 9 * * *",
"timezone": "UTC"
}'Cron expressions consist of 5 fields:
┌───────────── minute (0 - 59)
│ ┌───────────── hour (0 - 23)
│ │ ┌───────────── day of month (1 - 31)
│ │ │ ┌───────────── month (1 - 12)
│ │ │ │ ┌───────────── day of week (0 - 6) (Sunday = 0)
│ │ │ │ │
* * * * *# Every minute
* * * * *
# Every hour at minute 0
0 * * * *
# Every day at midnight
0 0 * * *
# Every day at 9 AM
0 9 * * *
# Every day at 9 AM and 5 PM
0 9,17 * * *
# Every weekday at 9 AM
0 9 * * 1-5
# Every Monday at 9 AM
0 9 * * 1
# First day of every month at midnight
0 0 1 * *
# Every 15 minutes
*/15 * * * *
# Every 6 hours
0 */6 * * *
# Every Sunday at 3 AM
0 3 * * 0*: Any value,: Value list separator (e.g.,1,3,5)-: Range of values (e.g.,1-5)/: Step values (e.g.,*/15= every 15 units)
Specify the timezone for your schedule:
# UTC (default)
--timezone "UTC"
# US Eastern Time
--timezone "America/New_York"
# US Pacific Time
--timezone "America/Los_Angeles"
# Central European Time
--timezone "Europe/Paris"
# Tokyo
--timezone "Asia/Tokyo"Use the IANA timezone database format.
Common timezones:
UTC- Coordinated Universal TimeAmerica/New_York- US EasternAmerica/Chicago- US CentralAmerica/Denver- US MountainAmerica/Los_Angeles- US PacificEurope/London- UKEurope/Paris- Central EuropeanAsia/Tokyo- JapanAustralia/Sydney- Australia
# Using CLI
aitronos streamline get <automation-id>
# Using API
curl "https://api.aitronos.com/v1/streamline/automations/{automation_id}" \
-H "Authorization: Bearer $FREDDY_SESSION_TOKEN"Response includes schedule information:
{
"id": "auto_abc123",
"name": "My Automation",
"schedule_enabled": true,
"schedule_cron": "0 9 * * *",
"schedule_timezone": "UTC",
"schedule_next_run_at": "2025-11-28T09:00:00Z"
}Toggle the schedule without removing it:
# Disable schedule
curl -X POST "https://api.aitronos.com/v1/streamline/automations/{automation_id}/schedule/toggle" \
-H "Authorization: Bearer $FREDDY_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"enabled": false}'
# Enable schedule
curl -X POST "https://api.aitronos.com/v1/streamline/automations/{automation_id}/schedule/toggle" \
-H "Authorization: Bearer $FREDDY_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"enabled": true}'To change the schedule, set a new one:
# Update to run every 2 hours
aitronos streamline schedule set <automation-id> \
--cron "0 */2 * * *"Delete the schedule completely:
# Using CLI
aitronos streamline schedule remove <automation-id>
# Using API
curl -X DELETE "https://api.aitronos.com/v1/streamline/automations/{automation_id}/schedule" \
-H "Authorization: Bearer $FREDDY_SESSION_TOKEN"View scheduled execution history:
# List recent executions
aitronos streamline executions list <automation-id>
# Filter by trigger method
curl "https://api.aitronos.com/v1/streamline/automations/{automation_id}/executions?limit=50" \
-H "Authorization: Bearer $FREDDY_SESSION_TOKEN"Executions triggered by schedule have trigger_method: "schedule".
Don't schedule too frequently:
# ❌ Bad: Every minute (may hit rate limits)
* * * * *
# ✅ Good: Every 15 minutes
*/15 * * * *
# ✅ Good: Every hour
0 * * * *Schedule in the appropriate timezone for your use case:
# For US business hours (9 AM EST)
aitronos streamline schedule set <automation-id> \
--cron "0 9 * * 1-5" \
--timezone "America/New_York"Distribute scheduled tasks to avoid peak times:
# Instead of everyone running at midnight
0 0 * * *
# Stagger executions
15 0 * * * # 12:15 AM
30 0 * * * # 12:30 AM
45 0 * * * # 12:45 AMTest your automation manually before setting a schedule:
# Test execution
aitronos streamline execute <automation-id>
# Verify results
aitronos streamline executions list <automation-id>
# If successful, set schedule
aitronos streamline schedule set <automation-id> --cron "0 9 * * *"Regularly check execution history:
# View recent executions
aitronos streamline executions list <automation-id> --limit 10
# Check for failures
curl "https://api.aitronos.com/v1/streamline/automations/{automation_id}/executions" \
-H "Authorization: Bearer $FREDDY_SESSION_TOKEN" \
| jq '.executions[] | select(.status == "failed")'Implement error handling in your automation:
def main(**kwargs):
"""Automation with error handling."""
try:
# Your logic here
result = process_data()
return {"success": True, "data": result}
except Exception as e:
# Log error
print(f"Error: {e}")
# Return error status
return {"success": False, "error": str(e)}# Generate report every day at 8 AM
aitronos streamline schedule set <automation-id> \
--cron "0 8 * * *" \
--timezone "America/New_York"# Sync data every 4 hours
aitronos streamline schedule set <automation-id> \
--cron "0 */4 * * *"# Clean up old data every Sunday at 2 AM
aitronos streamline schedule set <automation-id> \
--cron "0 2 * * 0"# Check system status every 30 minutes during business hours (9 AM - 5 PM, Mon-Fri)
# Note: Requires multiple schedules or custom logic
aitronos streamline schedule set <automation-id> \
--cron "*/30 9-17 * * 1-5" \
--timezone "America/New_York"# Generate monthly report on the 1st at 9 AM
aitronos streamline schedule set <automation-id> \
--cron "0 9 1 * *"Check schedule status:
aitronos streamline get <automation-id>Verify:
schedule_enabledistrueschedule_cronis correctschedule_next_run_atis in the future
Common issues:
- Schedule is disabled
- Invalid cron expression
- Automation is inactive
- Timezone mismatch
Verify timezone:
# Check current schedule
aitronos streamline get <automation-id>
# Update timezone if needed
aitronos streamline schedule set <automation-id> \
--cron "0 9 * * *" \
--timezone "America/New_York"Check execution logs:
# Get recent executions
aitronos streamline executions list <automation-id>
# Get specific execution details
aitronos streamline executions get <execution-id>Common issues:
- Automation code errors
- Missing dependencies
- Timeout (default 5 minutes)
- Resource limits exceeded
- Crontab Guru - Interactive cron expression editor
- Cron Expression Generator
Test your cron expression before setting:
# Use crontab.guru
https://crontab.guru/#0_9_*_*_*
# Or use Python
python3 -c "from croniter import croniter; print(croniter.is_valid('0 9 * * *'))"- Parameters & Configuration - Pass parameters to scheduled executions
- Monitoring - Monitor scheduled automation performance
- Best Practices - Follow recommended patterns
Need help with scheduling?
- Email: support@aitronos.com
- Documentation: Streamline Overview
- API Reference: Scheduling API