Developers

Cron job API & code samples

Manage online cron jobs from your own code, or copy a ready-made example and pick an interval.

REST API

Base URL https://fastcron.net/cronapi/secure-cron-api.php?action=…. Send your key in the X-Api-Key header and JSON in the body. Every answer is JSON with success and data or error. Find your key in the panel under Developers.

Methodaction=What it does
GETtestCheck your key and the API status.
GETget_jobsList your cron jobs.
GETget_statsRun counts and success rate.
POSTcreate_jobCreate a job: name, target_url, interval (2s, 1m, */5 * * * *), optional method, headers, body.
POSTupdate_job + idChange any of the fields above.
POSTpause_job + idPause a job.
POSTresume_job + idResume a paused job.
POSTdelete_job + idDelete a job.

+ id actions also need &job_id=ID in the URL. Limit: 120 requests per minute per key. API access is part of API-enabled packages.

cURL
curl -X POST "https://fastcron.net/cronapi/secure-cron-api.php?action=create_job" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Queue worker","target_url":"https://example.com/queue/work","interval":"5s"}'

Response & errors

200 OK · create_job
{
  "success": true,
  "message": "Job created successfully",
  "data": {
    "job_id": "job_6716a3f2c81b4",
    "job": { "name": "Queue worker", "interval": "5s",
             "enabled": true, "total_executions": 0 }
  }
}
  • 401Missing or wrong X-Api-Key
  • 403API not enabled for the account, or action not allowed
  • 400Invalid JSON, field or interval – see error
  • 404Job not found for this key
  • 405Write actions must use POST
  • 429Over 120 requests/minute – retry after the seconds in error

Cron job examples

Common jobs people schedule with FastCron. Copy a URL, pick an interval, done.

WordPress cron

Replace slow WP-Cron with a reliable trigger.

*/5 * * * *
https://example.com/wp-cron.php?doing_wp_cron

Webhooks

Fire a webhook every 10 seconds.

10s
https://example.com/hooks/tick

Backups

Trigger a nightly backup script.

0 2 * * *
https://example.com/backup/run?token=...

Queue workers

Process your job queue every 2 seconds.

2s
https://example.com/queue/work

API sync

Pull data from a partner API every minute.

1m
https://example.com/sync/orders

Health checks

Ping an endpoint every 30 seconds.

30s
https://example.com/health

Watch every run

Each job keeps its own log with status code and response time, so you can see a 2 second cron job firing in real time.

Get Started
Live job runssimulated preview
2s
0
5s
0
10s
0