Deploy Cron Webhook Trigger
Trigger authenticated HTTP endpoints on a schedule
cron-job
Just deployed
Deploy and Host Cron Webhook Trigger on Railway
A lightweight Bun function that triggers HTTP endpoints on a schedule using Bearer token authentication. Perfect for running scheduled tasks, triggering webhooks, or pinging external APIs securely without managing infrastructure.
About Hosting Cron Webhook Trigger
This template deploys a minimal Bun function on Railway that calls a configured endpoint with a CRON_SECRET Bearer token for authentication. The function runs on Railway's cron scheduler, which you configure in the Settings tab after deployment. All logs are structured JSON for easy debugging in Railway's log viewer. Simply set your environment variables, configure your cron schedule, and your endpoint will be called automatically at your specified interval.
Common Use Cases
- Triggering scheduled jobs on external APIs or your own services
- Pinging health check endpoints at regular intervals
- Running periodic data sync or cleanup tasks on remote servers
Dependencies for Cron Webhook Trigger Hosting
CRON_SECRET- A secure token used in the Authorization Bearer headerENDPOINT_URL- The URL to call when the cron job runs
Deployment Dependencies
Implementation Details
After deploying, you must configure the cron schedule in the Settings tab of your service. Set the schedule using standard cron syntax (e.g., 0 * * * * for hourly, */15 * * * * for every 15 minutes).
The function logs all responses as structured JSON:
{
"level": "info",
"message": "Cron job completed",
"status": 200,
"data": { ... }
}
Why Deploy Cron Webhook Trigger on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Cron Webhook Trigger on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
ENDPOINT_URL
The endpoint you want the cron job to call
