Free Cron Job API — Schedule Tasks & Trigger Webhooks
Need to run tasks on a schedule without managing a crontab or a background worker? The Agent Scheduler API lets you create cron jobs, fixed-interval timers, and one-shot delayed tasks via REST. It triggers webhooks on schedule, tracks execution history, and supports pause/resume — all without setting up any infrastructure.
In this guide you'll learn how to create scheduled jobs, validate cron expressions, manage execution history, and build real-world automation workflows with the API.
3 Schedule Types
Cron expressions, fixed intervals (every N seconds/minutes/hours), and one-shot timers for delayed tasks.
Webhook Triggers
Each schedule fires an HTTP request to your endpoint on time. POST, GET, or any method with custom headers and body.
Execution History
View every past execution with status, response code, duration, and timestamp. Debug failed runs instantly.
Pause & Resume
Pause schedules during maintenance, resume when ready. No need to delete and recreate.
Quick Start — Create a Cron Job
Get an API key (free), then create a cron job that triggers a webhook every 5 minutes:
Step 1: Get an API Key
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-scheduler/api/keys/create
{
"apiKey": "sc_abc123...",
"credits": 100,
"plan": "free"
}
Step 2: Create a Cron Schedule
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-scheduler/api/schedules \
-H "Authorization: Bearer sc_abc123..." \
-H "Content-Type: application/json" \
-d '{
"name": "Health Check",
"type": "cron",
"expression": "*/5 * * * *",
"webhook": {
"url": "https://your-app.com/api/health-check",
"method": "POST",
"headers": {"X-Source": "scheduler"},
"body": {"check": "database"}
},
"timezone": "America/New_York"
}'
# Response:
{
"id": "sch_a1b2c3d4",
"name": "Health Check",
"type": "cron",
"expression": "*/5 * * * *",
"timezone": "America/New_York",
"status": "active",
"nextExecution": "2026-03-03T16:30:00.000Z",
"created": "2026-03-03T16:27:42.123Z"
}
import requests
API_KEY = "sc_abc123..."
BASE = "https://agent-gateway-kappa.vercel.app/v1/agent-scheduler"
resp = requests.post(
f"{BASE}/api/schedules",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"name": "Health Check",
"type": "cron",
"expression": "*/5 * * * *",
"webhook": {
"url": "https://your-app.com/api/health-check",
"method": "POST",
"body": {"check": "database"}
},
"timezone": "America/New_York"
}
)
schedule = resp.json()
print(f"Created: {schedule['id']}, next run: {schedule['nextExecution']}")
const API_KEY = "sc_abc123...";
const BASE = "https://agent-gateway-kappa.vercel.app/v1/agent-scheduler";
const resp = await fetch(`${BASE}/api/schedules`, {
method: "POST",
headers: {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
name: "Health Check",
type: "cron",
expression: "*/5 * * * *",
webhook: {
url: "https://your-app.com/api/health-check",
method: "POST",
body: { check: "database" }
},
timezone: "America/New_York"
})
});
const schedule = await resp.json();
console.log(`Created: ${schedule.id}, next: ${schedule.nextExecution}`);
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/schedules | Create a schedule (cron, interval, or once) |
| GET | /api/schedules | List all your schedules |
| GET | /api/schedules/:id | Get schedule details |
| PATCH | /api/schedules/:id | Update schedule settings |
| DELETE | /api/schedules/:id | Delete a schedule |
| POST | /api/schedules/:id/pause | Pause a schedule |
| POST | /api/schedules/:id/resume | Resume a paused schedule |
| POST | /api/schedules/:id/trigger | Manually trigger execution now |
| GET | /api/schedules/:id/executions | View execution history |
| GET | /api/schedules/:id/next | Preview next N execution times |
| GET | /api/upcoming | All upcoming executions across all schedules |
| POST | /api/cron/validate | Validate and preview a cron expression |
Schedule Types
Cron Expression
Standard 5-field cron syntax. Runs at exact times matching the pattern:
# Every weekday at 9 AM ET
{
"type": "cron",
"expression": "0 9 * * 1-5",
"timezone": "America/New_York"
}
# First day of every month at midnight
{
"type": "cron",
"expression": "0 0 1 * *"
}
# Every 15 minutes during business hours
{
"type": "cron",
"expression": "*/15 9-17 * * *"
}
Fixed Interval
Repeat at a fixed interval from the moment the schedule is created:
# Every 30 seconds
{
"type": "interval",
"interval": 30,
"unit": "seconds"
}
# Every 2 hours
{
"type": "interval",
"interval": 2,
"unit": "hours"
}
One-Shot Timer
Execute once after a delay — useful for deferred tasks:
# Execute once, 30 minutes from now
{
"type": "once",
"delay": 1800
}
# Execute once at a specific time
{
"type": "once",
"runAt": "2026-03-04T00:00:00Z"
}
Validate Cron Expressions
Not sure if your cron syntax is correct? Use the validator to check and preview next execution times:
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-scheduler/api/cron/validate \
-H "Content-Type: application/json" \
-d '{"expression": "*/5 * * * *"}'
{
"valid": true,
"expression": "*/5 * * * *",
"timezone": "UTC",
"nextExecutions": [
"2026-03-03T20:30:00.000Z",
"2026-03-03T20:35:00.000Z",
"2026-03-03T20:40:00.000Z",
"2026-03-03T20:45:00.000Z",
"2026-03-03T20:50:00.000Z"
]
}
Manage Schedules
Pause and Resume
# Pause during maintenance
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-scheduler/api/schedules/sch_a1b2c3d4/pause \
-H "Authorization: Bearer sc_abc123..."
# Resume when ready
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-scheduler/api/schedules/sch_a1b2c3d4/resume \
-H "Authorization: Bearer sc_abc123..."
Manual Trigger
# Fire the webhook right now (doesn't affect the regular schedule)
curl -X POST https://agent-gateway-kappa.vercel.app/v1/agent-scheduler/api/schedules/sch_a1b2c3d4/trigger \
-H "Authorization: Bearer sc_abc123..."
View Execution History
curl https://agent-gateway-kappa.vercel.app/v1/agent-scheduler/api/schedules/sch_a1b2c3d4/executions \
-H "Authorization: Bearer sc_abc123..."
{
"executions": [
{
"id": "exec_001",
"scheduledFor": "2026-03-03T16:30:00.000Z",
"executedAt": "2026-03-03T16:30:00.412Z",
"status": "success",
"responseCode": 200,
"duration_ms": 145
},
{
"id": "exec_002",
"scheduledFor": "2026-03-03T16:35:00.000Z",
"executedAt": "2026-03-03T16:35:00.389Z",
"status": "failed",
"responseCode": 503,
"error": "Service Unavailable",
"duration_ms": 5012
}
]
}
Real-World Use Cases
Health Monitoring
Ping your services every 5 minutes. Get notified when a health check fails by checking execution history for non-200 responses.
Report Generation
Trigger daily/weekly report generation. Hit your report endpoint at 9 AM every Monday with the right parameters.
Data Sync & ETL
Schedule data imports from APIs, database syncs, or cache invalidation at regular intervals.
AI Agent Automation
Schedule AI agents to run tasks: daily market analysis, content generation, social media posting, or data scraping on a timer.
Comparison: Free Cron API vs Alternatives
| Feature | Agent Scheduler | EasyCron | cron-job.org | Upstash QStash |
|---|---|---|---|---|
| Free tier | 100 credits | 1 job | 4 jobs | 500 msg/day |
| Signup required | No | Yes | Yes | Yes |
| Cron expressions | Yes | Yes | Yes | Yes |
| Fixed intervals | Yes | Limited | No | Yes |
| One-shot timers | Yes | No | No | Yes |
| Custom webhook body | Yes | Paid | No | Yes |
| Execution history | Yes | Paid | Limited | Yes |
| Pause/resume | Yes | Yes | Yes | No |
| Cron validator | Yes | No | No | No |
| Timezone support | Yes | Yes | Yes | Yes |
| API-first | REST API | Web UI | Web UI | REST API |
Key advantage: Agent Scheduler is fully API-driven — no web dashboard required. Create, manage, and monitor schedules entirely through REST calls. Most alternatives are GUI-first tools that bolt on an API as an afterthought.
Common Cron Expressions
| Expression | Description |
|---|---|
* * * * * | Every minute |
*/5 * * * * | Every 5 minutes |
0 * * * * | Every hour (on the hour) |
0 9 * * * | Every day at 9:00 AM |
0 9 * * 1-5 | Weekdays at 9:00 AM |
0 0 * * 0 | Every Sunday at midnight |
0 0 1 * * | First day of every month |
*/15 9-17 * * * | Every 15 min during business hours |
FAQ
Do I need an API key to use the scheduler?
Yes, an API key is needed to create and manage schedules. Creating a key is free and instant — just POST to /api/keys/create. No email or account required.
What happens if my webhook endpoint is down?
The execution is logged with a "failed" status including the HTTP error code and response. You can view failures in the execution history. The schedule continues running on its normal cadence.
Can I use this as a replacement for system crontab?
Yes, for webhook-triggered tasks. Instead of running commands on a server, the scheduler sends HTTP requests to your endpoints. This is ideal for serverless architectures, microservices, and cloud-native apps where you don't have persistent servers.
What timezone does the scheduler use?
UTC by default. You can set a timezone per schedule using IANA timezone names like America/New_York, Europe/London, or Asia/Tokyo.
Is there a limit on how many schedules I can create?
The free tier gives you 100 credits. Each schedule creation costs 1 credit. You can have multiple active schedules running simultaneously.
Can I manually trigger a schedule outside its normal cadence?
Yes. POST to /api/schedules/:id/trigger to fire the webhook immediately. This doesn't affect the regular schedule — the next scheduled execution still runs at its normal time.
Schedule Your First Cron Job in 60 Seconds
No signup, no infrastructure. Create a schedule, point it at your webhook, and it just runs.
Getting Started Guide