Skip to content

Trigger schedule now

POST
/api/v1/schedules/{id}/trigger
curl -X POST 'https://dashboard.justcrawl.io/api/v1/schedules/sch_01ABC/trigger' \
-H 'Authorization: Bearer $JUSTCRAWL_API_KEY'

Fires the schedule on-demand without waiting for its next cron tick. The gateway resolves the URL set (filtered by tagFilters), enqueues a job per URL through the same dispatch path the cron tick uses, and returns jobsCreated + a scheduleRunId you can pass to GET /api/v1/schedules/runs?runId=... to follow the batch. Edge cases: when the URL filter resolves to zero URLs the call returns 200 with jobsCreated: 0 and a human-readable message — that’s an empty filter, not an error. SCHEDULER_MAX_URLS_PER_RUN (default 1000) caps a single trigger to avoid runaway batches. Subject to requireActiveQuota: over-quota orgs get 402 with the standard QUOTA_EXCEEDED payload. This is the endpoint the MCP server’s jc_schedules_trigger tool wraps.

id
required
string

Schedule triggered. jobsCreated is 0 when the URL filter matched no URLs (call still succeeded).

Media type application/json
object
jobsCreated
integer
scheduleRunId

ID for the new schedule_runs row covering this trigger; omitted when no URLs matched.

string
message

Present only when jobsCreated is 0 — explains why nothing was enqueued.

string
Example generated
{
"jobsCreated": 1,
"scheduleRunId": "example",
"message": "example"
}

Validation failed — request body or query is missing/invalid

Media type application/json
object
error
string
Example
{
"error": "Missing or invalid \"url\" field"
}

Missing or invalid authentication token

Media type application/json
object
error
string
Example
{
"error": "Missing or invalid authentication token"
}

Org over the active credit/quota allowance.

Media type application/json
object
error
string
message
string
Example
{
"error": "QUOTA_EXCEEDED"
}

Insufficient permissions for this operation

Media type application/json
object
error
string
Example
{
"error": "No organization. Complete onboarding first."
}

Schedule not found.

Unexpected server error. Logs and PostHog $exception capture

Media type application/json
object
error
string
Example
{
"error": "Something went wrong"
}