Real-world examples and patterns for A1Cron
{
"name": "Daily Sales Report",
"description": "Generates comprehensive sales report for the previous day",
"endpoint_url": "https://api.company.com/reports/daily-sales",
"method": "POST",
"headers": {
"Authorization": "Bearer ${REPORT_API_KEY}",
"Content-Type": "application/json"
},
"body": "{\"report_type\": \"sales\", \"format\": \"pdf\", \"date\": \"yesterday\"}",
"timezone": "America/New_York",
"schedule_config": {
"repeat_type": "days",
"repeat_every": 1,
"time": "09:00",
"end_type": "never"
},
"retry_config": {
"max_retries": 3,
"retry_delay_seconds": 300,
"timeout_seconds": 120
},
"callbacks": {
"success_url": "https://api.company.com/webhooks/report-generated",
"failure_url": "https://api.company.com/webhooks/report-failed"
},
"tags": ["reports", "daily", "sales", "production"]
}
{
"name": "Nightly Database Backup",
"description": "Backup production database to S3",
"endpoint_url": "https://api.company.com/operations/backup",
"method": "POST",
"headers": {
"X-API-Key": "${BACKUP_API_KEY}"
},
"body": "{\"database\": \"production\", \"destination\": \"s3\", \"compression\": true}",
"timezone": "UTC",
"schedule_config": {
"repeat_type": "days",
"repeat_every": 1,
"time": "02:00",
"end_type": "never"
},
"retry_config": {
"max_retries": 5,
"retry_delay_seconds": 600,
"timeout_seconds": 300
},
"callbacks": {
"failure_url": "https://alerts.company.com/critical/backup-failed"
},
"tags": ["backup", "database", "critical"]
}
{
"name": "Weekly Team Performance",
"description": "Email team performance metrics to managers",
"endpoint_url": "https://api.company.com/reports/team-weekly",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer ${REPORTS_TOKEN}"
},
"body": "{\"teams\": [\"sales\", \"support\", \"engineering\"], \"send_email\": true}",
"timezone": "America/Chicago",
"schedule_config": {
"repeat_type": "weeks",
"repeat_every": 1,
"time": "08:00",
"days_of_week": ["1"],
"end_type": "never"
},
"tags": ["reports", "weekly", "management"]
}
{
"name": "Weekday CRM Sync",
"description": "Sync customer data from CRM to data warehouse",
"endpoint_url": "https://api.company.com/sync/crm-to-warehouse",
"method": "POST",
"headers": {
"X-Sync-Token": "${SYNC_TOKEN}"
},
"body": "{\"mode\": \"incremental\", \"since\": \"last_sync\"}",
"timezone": "America/Los_Angeles",
"schedule_config": {
"repeat_type": "weeks",
"repeat_every": 1,
"time": "18:00",
"days_of_week": ["1", "2", "3", "4", "5"],
"end_type": "never"
},
"retry_config": {
"max_retries": 3,
"retry_delay_seconds": 900,
"timeout_seconds": 180
},
"tags": ["sync", "crm", "data-warehouse"]
}
{
"name": "Production API Health Check",
"description": "Check if production API is responding",
"endpoint_url": "https://api.company.com/health",
"method": "GET",
"timezone": "UTC",
"schedule_config": {
"repeat_type": "hourly",
"repeat_every": 1,
"time": "00:00",
"end_type": "never"
},
"retry_config": {
"max_retries": 2,
"retry_delay_seconds": 30,
"timeout_seconds": 10
},
"callbacks": {
"failure_url": "https://alerts.pagerduty.com/webhook/api-down"
},
"tags": ["monitoring", "health", "critical"]
}
{
"name": "Product Cache Refresh",
"description": "Refresh product catalog cache",
"endpoint_url": "https://api.company.com/cache/refresh",
"method": "POST",
"headers": {
"X-Cache-Key": "${CACHE_KEY}"
},
"body": "{\"cache_type\": \"products\", \"force\": true}",
"timezone": "UTC",
"schedule_config": {
"repeat_type": "hourly",
"repeat_every": 2,
"time": "00:30",
"end_type": "never"
},
"tags": ["cache", "products", "performance"]
}
{
"name": "Monthly Subscription Billing",
"description": "Process all active monthly subscriptions",
"endpoint_url": "https://api.company.com/billing/process-monthly",
"method": "POST",
"headers": {
"Authorization": "Bearer ${BILLING_API_KEY}",
"Content-Type": "application/json"
},
"body": "{\"billing_cycle\": \"monthly\", \"retry_failed\": true}",
"timezone": "America/New_York",
"schedule_config": {
"repeat_type": "months",
"repeat_every": 1,
"time": "04:00",
"end_type": "never"
},
"retry_config": {
"max_retries": 5,
"retry_delay_seconds": 3600,
"timeout_seconds": 300
},
"callbacks": {
"success_url": "https://api.company.com/webhooks/billing-complete",
"failure_url": "https://api.company.com/webhooks/billing-failed"
},
"tags": ["billing", "monthly", "financial", "critical"]
}
{
"name": "Monthly Report Archive",
"description": "Move reports older than 90 days to cold storage",
"endpoint_url": "https://api.company.com/archive/reports",
"method": "POST",
"body": "{\"older_than_days\": 90, \"destination\": \"glacier\"}",
"timezone": "UTC",
"schedule_config": {
"repeat_type": "months",
"repeat_every": 1,
"time": "03:00",
"end_type": "never"
},
"tags": ["archive", "storage", "maintenance"]
}
{
"name": "Summer Sale Campaign",
"description": "Send daily promotional emails for summer sale",
"endpoint_url": "https://api.company.com/campaigns/summer-sale/send",
"method": "POST",
"headers": {
"X-Campaign-ID": "summer-2024"
},
"body": "{\"segment\": \"all_subscribers\", \"template\": \"summer_sale_daily\"}",
"timezone": "America/New_York",
"schedule_config": {
"repeat_type": "days",
"repeat_every": 1,
"time": "10:00",
"end_type": "after",
"end_occurrences": 30
},
"callbacks": {
"success_url": "https://api.company.com/campaigns/webhook/sent"
},
"tags": ["campaign", "marketing", "summer-sale", "temporary"]
}
{
"name": "Trial Reminder Sequence",
"description": "Send trial reminders on days 3, 7, and 13",
"endpoint_url": "https://api.company.com/trials/send-reminder",
"method": "POST",
"headers": {
"Authorization": "Bearer ${TRIAL_API_KEY}"
},
"body": "{\"trial_id\": \"${TRIAL_ID}\", \"reminder_type\": \"scheduled\"}",
"timezone": "UTC",
"schedule_config": {
"repeat_type": "days",
"repeat_every": 1,
"time": "14:00",
"end_type": "on",
"end_date": "2024-12-31T23:59:59Z"
},
"tags": ["trial", "onboarding", "temporary"]
}
{
"name": "Business Hours Sync",
"description": "Sync data every 30 minutes during business hours",
"endpoint_url": "https://api.company.com/sync/realtime",
"method": "POST",
"timezone": "America/New_York",
"schedule_config": {
"repeat_type": "hourly",
"repeat_every": 1,
"time": "00:00",
"end_type": "never"
},
"headers": {
"X-Sync-Mode": "business-hours"
},
"tags": ["sync", "business-hours"]
}
{
"name": "Quarterly Financial Report",
"description": "Generate comprehensive quarterly financial report",
"endpoint_url": "https://api.company.com/reports/quarterly-financial",
"method": "POST",
"headers": {
"Authorization": "Bearer ${FINANCIAL_API_KEY}"
},
"body": "{\"report_type\": \"quarterly\", \"include_projections\": true}",
"timezone": "America/New_York",
"schedule_config": {
"repeat_type": "months",
"repeat_every": 3,
"time": "06:00",
"end_type": "never"
},
"retry_config": {
"max_retries": 5,
"retry_delay_seconds": 1800,
"timeout_seconds": 600
},
"callbacks": {
"success_url": "https://api.company.com/webhooks/quarterly-report-ready"
},
"tags": ["reports", "quarterly", "financial", "executive"]
}
{
"name": "Data Export with Backoff",
"description": "Export data with exponential retry delays",
"endpoint_url": "https://api.company.com/export/large-dataset",
"method": "POST",
"timezone": "UTC",
"schedule_config": {
"repeat_type": "days",
"repeat_every": 1,
"time": "01:00",
"end_type": "never"
},
"retry_config": {
"max_retries": 5,
"retry_delay_seconds": 60,
"timeout_seconds": 600
},
"callbacks": {
"failure_url": "https://api.company.com/alerts/export-failed"
},
"tags": ["export", "data", "large"]
}
{
"name": "Critical Payment Processing",
"description": "Process pending payments with comprehensive error handling",
"endpoint_url": "https://api.company.com/payments/process-pending",
"method": "POST",
"headers": {
"X-Payment-Key": "${PAYMENT_KEY}",
"X-Idempotency-Key": "${TIMESTAMP}"
},
"timezone": "America/New_York",
"schedule_config": {
"repeat_type": "hourly",
"repeat_every": 1,
"time": "00:15",
"end_type": "never"
},
"retry_config": {
"max_retries": 3,
"retry_delay_seconds": 300,
"timeout_seconds": 120
},
"callbacks": {
"success_url": "https://api.company.com/webhooks/payments-processed",
"failure_url": "https://alerts.company.com/critical/payment-processing-failed"
},
"tags": ["payments", "critical", "financial"]
}
{
"name": "Production Data Sync",
"tags": ["production", "sync", "critical", "team:data", "owner:john.doe"]
}
{
"headers": {
"X-Idempotency-Key": "cron-${JOB_ID}-${EXECUTION_TIME}"
}
}
{
"name": "[PROD] Daily Cleanup",
"endpoint_url": "https://api.production.company.com/cleanup",
"tags": ["environment:production", "cleanup", "automated"]
}
{
"name": "Report Generator - Dry Run",
"endpoint_url": "https://api.company.com/reports/generate",
"headers": {
"X-Dry-Run": "true"
},
"body": "{\"mode\": \"test\", \"send_notifications\": false}",
"tags": ["test", "dry-run"]
}
{
"name": "[SANDBOX] Payment Test",
"endpoint_url": "https://sandbox.company.com/api/payments/test",
"headers": {
"X-Environment": "sandbox"
},
"tags": ["sandbox", "test", "payments"]
}