AllClearStack logoAllClearStack logo
AllClearStack
All articles
AllClearStack editorial·Reliability··9 min read

How to Schedule Webhooks Without Cron Jobs

Cron is useful for repeated work. A durable scheduler is usually a better model for one HTTP request at a specific future time.

Cron is excellent at repeated schedules: every hour, every night, or every Monday. It is a less natural fit for one-off work such as "call this customer endpoint at 14:37 next Thursday."

Teams still use cron for this problem because it is familiar. A process wakes up every minute, queries for due rows, and sends them. The design can work, but reliability depends on details that are easy to miss.

Why polling cron becomes awkward

The worker must claim rows atomically so two instances do not send the same webhook. It must recover jobs abandoned by a crashed worker, handle clock and deployment issues, and prevent one slow destination from blocking the rest.

At low volume, this may be acceptable. At customer-facing scale, it becomes a queue.

Three practical approaches

ApproachBest forMain responsibility
Database table and workerLow volume, strong database skillsLocking, retries, recovery
Cloud task serviceTeams already on one cloudPlatform setup and limits
Managed webhook schedulerFast delivery with a small teamVendor evaluation and integration

Option 1: database-backed scheduling

Store each job with a due time and claim due rows using database locking. PostgreSQL's FOR UPDATE SKIP LOCKED can support multiple workers safely.

This approach is transparent and portable, but your team owns worker uptime, retry policy, logs, cleanup, and security around user-provided URLs.

Option 2: a cloud task service

Google Cloud Tasks and similar services provide durable delayed delivery and retry controls. They are a strong choice when the application already uses the provider and the team is comfortable with its operational model.

Option 3: a focused scheduling API

A managed scheduler accepts the request details and future time, then handles delivery and retries. The value is speed and a smaller operational surface; the cost is another dependency.

Disclosure: we built Webhook Scheduler for this exact use case. Evaluate it alongside cloud task services and your own worker based on volume, retention, security, and portability.

Security requirements

Any system that calls user-provided URLs must defend against server-side request forgery. Block private and link-local addresses, validate DNS carefully, restrict redirects, apply timeouts and response-size limits, and consider destination allowlists for sensitive products.

Use cron and a database when the workload is small and your team is willing to own the edge cases. Use cloud tasks when the surrounding platform already fits. Use a managed scheduler when time to market and operational simplicity matter more than avoiding a dependency.

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.

Related articles