What is Webhook?
An HTTP callback that automatically sends data to a URL when a specific event occurs.
Definition
A webhook is a mechanism where one system sends an HTTP request to another system's URL automatically when a specific event occurs. Unlike polling (repeatedly asking "is there something new?"), webhooks push updates in real time. In CronJobPro, webhooks serve dual purposes: your cron jobs are essentially outgoing HTTP requests (webhooks to your endpoints), and you can receive incoming webhooks from CronJobPro to be notified of execution results.
Simple Analogy
Like a package delivery notification โ instead of repeatedly checking the tracking page, the delivery service texts you automatically when the package arrives.
Why It Matters
Webhooks are the primary mechanism CronJobPro uses to trigger your jobs. Each cron job is an HTTP request (webhook) sent to your specified URL. Understanding webhooks helps you design reliable endpoints, secure them against unauthorized access, and process the incoming requests correctly.
How to Verify
Test your webhook endpoint by sending a manual request with curl or Postman. Verify it returns the correct status code and response. In CronJobPro, use the "Test Now" feature to send an immediate request and inspect the result.
Common Mistakes
Not securing webhook endpoints with authentication, allowing anyone to trigger your job. Not responding with 200 quickly (long processing should happen asynchronously). Not implementing idempotency, so duplicate webhook deliveries cause duplicate processing.
Best Practices
Respond to webhook requests quickly (under 30 seconds) and process heavy work asynchronously. Secure your endpoint with authentication (API key, HMAC signature). Make your handler idempotent. Log all incoming webhook requests for debugging.
HTTP Methods Guide
Learn about HTTP methods
Try it free โFrequently Asked Questions
What is Webhook?
A webhook is a mechanism where one system sends an HTTP request to another system's URL automatically when a specific event occurs. Unlike polling (repeatedly asking "is there something new?"), webhooks push updates in real time. In CronJobPro, webhooks serve dual purposes: your cron jobs are essentially outgoing HTTP requests (webhooks to your endpoints), and you can receive incoming webhooks from CronJobPro to be notified of execution results.
Why does Webhook matter for cron jobs?
Webhooks are the primary mechanism CronJobPro uses to trigger your jobs. Each cron job is an HTTP request (webhook) sent to your specified URL. Understanding webhooks helps you design reliable endpoints, secure them against unauthorized access, and process the incoming requests correctly.
What are best practices for Webhook?
Respond to webhook requests quickly (under 30 seconds) and process heavy work asynchronously. Secure your endpoint with authentication (API key, HMAC signature). Make your handler idempotent. Log all incoming webhook requests for debugging.
Related Terms
Endpoint
A specific URL where an API or service receives and processes HTTP requests.
Callback URL
A URL that receives notification when an asynchronous operation completes.
HMAC Signature
A cryptographic hash used to verify that a webhook request is authentic and has not been tampered with.
HTTP Method
The verb (GET, POST, PUT, DELETE, etc.) that defines the type of action an HTTP request performs.