Webhooks
A1Cron supports webhook callbacks to notify your application about cron job execution results in real-time. You can configure separate URLs for successful and failed executions.Webhook Configuration
When creating or updating a cron job, you can specify webhook URLs in thecallbacks object:
Webhook Payload
Both success and failure webhooks receive the same payload structure:string
The unique identifier of the cron job
string
The name of the cron job
string
Unique identifier for this specific execution
string
Execution status:
success, failure, error, or timeoutstring
ISO 8601 timestamp of when the job was executed
integer
HTTP response code from the endpoint (null for timeouts)
integer
Time taken for the request in milliseconds
string
Response body from the endpoint (truncated to 1KB)
string
Error message if the execution failed (null for success)
integer
Which retry attempt this was (0 for first attempt)
string
ISO 8601 timestamp of next retry (null if no more retries)
Webhook Examples
Success Webhook Payload
Failure Webhook Payload
Timeout Webhook Payload
Implementing Webhook Handlers
Node.js Express Example
Python Flask Example
Webhook Security
Verify Webhook Signatures
A1Cron signs webhook payloads using HMAC-SHA256. Verify the signature to ensure the webhook is from A1Cron:IP Whitelisting
For additional security, whitelist A1Cron’s webhook IP addresses:52.89.214.23834.212.75.3054.218.53.128
Webhook Best Practices
Respond Quickly
Respond Quickly
Return a 2xx status code within 10 seconds. Process heavy operations asynchronously.
Implement Idempotency
Implement Idempotency
Use the
execution_id to prevent duplicate processing:Handle Retries
Handle Retries
A1Cron retries failed webhook deliveries up to 3 times with exponential backoff.
Monitor Webhook Health
Monitor Webhook Health
Log all webhook receipts and failures for debugging:
Common Use Cases
Alert on Failures
Track Execution Metrics
Chain Dependent Jobs
Testing Webhooks
Use webhook.site to test webhook integration:- Go to webhook.site to get a unique URL
- Use it as your webhook URL when creating a cron job
- Trigger the cron job manually
- View the webhook payload on webhook.site

