Choose a delayed HTTP call before building a workflow engine
Separate one future request from a branching workflow, and choose infrastructure for the behavior your product actually needs.
“Run this later” can describe very different requirements. A reminder may need one future HTTP request. A document-processing pipeline may need compute, branching, intermediate results and recovery across several steps. Writing those requirements down first can prevent an unnecessarily large infrastructure project.
Describe the behavior in product terms
Identify the event that creates the work, when it becomes due, what system should receive it and which state changes make it obsolete. Include the failure behavior: what should a user see if scheduling fails, and what should an operator do if the outcome is uncertain?
For a single reminder, the behavior might fit in one application record and one endpoint. For a multi-step process, write down the dependencies and ownership of each step. Do not infer that a future HTTP call also provides durable execution of arbitrary application code.
Use a request as a small boundary
WebhookScheduler accepts delayed HTTP work. Your server supplies the destination, time and payload, then retains the returned job ID. The illustrative example uses a record identifier so the receiver can load current state rather than relying on a stale snapshot.
Illustrative server-side example: this schedules delivery 24 hours from execution. Replace the environment variables and example record IDs, persist the returned job ID, and implement your own authenticated HTTPS receiver. The request follows the current API reference.
const apiKey = process.env.WEBHOOK_SCHEDULER_API_KEY;
const receiverUrl = process.env.REMINDER_WEBHOOK_URL;
if (!apiKey || !receiverUrl) throw new Error("Set the server-side API key and public HTTPS receiver URL.");
const response = await fetch("https://webhookscheduler.com/api/v1/schedule", {
method: "POST",
headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
body: JSON.stringify({
url: receiverUrl,
method: "POST",
runAt: new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString(),
reference: "task:example-123",
idempotencyKey: "task-example-123-reminder-v1",
body: { resourceId: "example-123" },
}),
});
if (!response.ok) throw new Error(`Scheduling failed: ${response.status}`);
const job = await response.json();
if (!job.id) throw new Error("Missing scheduled job ID");
// Persist job.id with your business record before acknowledging this work.
console.log(job.id);
Keep the idempotency key stable when retrying the same scheduling intention after a timeout. Reusing it retrieves the retained original job; it does not change the payload. If the intention changes, make that a deliberate replacement in your application records.
Keep application responsibilities visible
Your endpoint still authenticates the delivery, checks whether the action is relevant and applies the business effect. The scheduler does not decide whether a trial is still active or an invoice is unpaid. Those decisions belong to the application that owns the data.
The receiver must also tolerate repeated deliveries. Claim effects using a durable business-event identity and use downstream idempotency where available. Define a recovery path when an external service may have accepted an action but your application did not record the response. Avoid describing the entire chain as exactly-once.
Recognize when one request is no longer enough
If the work requires substantial compute, private-network access, complex dependencies or durable coordination across many steps, a delayed public HTTP request may be only one piece of the design. Evaluate a worker or workflow system against those explicit requirements.
That evaluation should include deployment, retries, retained state, observability and recovery—not just how short the first code example looks. Avoid adding a workflow engine merely because the product might need branching someday. An ordinary database worker can be sufficient when it already runs reliably in the application environment.
Make the next implementation reversible
WebhookScheduler is built by AllClearStack. A managed scheduler is useful when its small HTTP boundary matches the requirement and reduces infrastructure your team must operate. The tradeoff is another service dependency; business logic and operational judgment still remain in your product.
Keep local business identifiers separate from provider job IDs and retain an explicit record of what should happen. That makes reconciliation and a later change of transport more manageable. Use the queue cost guide to examine your own assumptions about maintenance work before choosing the larger system.
Disclosure · Built by the AllClearStack team
When ownership is the expensive part
Webhook Scheduler handles delayed HTTP delivery, automatic retries, per-attempt logs, and one-call cancellation. Try a real delivery without creating an account.