CorefinityCorefinityDocs
Open the Control PanelControl Panel
Scheduled tasks · 3 of 3

Check a schedule or a command

Checks a schedule, a command or both, and answers when the schedule would next run, any warnings and anything refused. Nothing is saved.

POST/api/corestack/sites/{site}/crons/validate

Path parameters

siteintegerRequired

The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.

Body

commandstring or null

Checked against the same rules as a saved command, including its 500 character limit. Up to 20,000 characters.

schedulestring or null

Up to 200 characters.

Returns

200 The result of the check. A schedule or command that is refused answers 200 with valid false.

Fields of the 200 answer
errorsobjectRequired

What was refused, keyed by the schedule field (minute, hour and so on) or command. An empty object when nothing was.

humanstring or nullRequired

The schedule in words. Null when no valid schedule was sent.

next_runsarray of stringsRequired

The next three runs.

normalisedstring or nullRequired

The schedule as it would be saved.

validbooleanRequired
warningsarray of stringsRequired

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
409deletedThe site, environment or copy has been deleted, or is being deleted. Nothing can be changed on it. Restore a deleted site first if it can still be restored.
409provisioningThe site is still being created. Try again in a few minutes.
422invalidFix the field named in field; errors says why.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl -X POST https://manage.corefinity.com/api/corestack/sites/1042/crons/validate \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "command": "php bin/console app:export",
    "schedule": "30 2 * * *"
  }'
{
  "errors": {
    "command": "Command contains `sudo`, which is not allowed in a cron",
    "minute": "Minute must be 0–59"
  },
  "human": null,
  "next_runs": [],
  "normalised": null,
  "valid": false,
  "warnings": []
}
Try it
Held in this tab's memory only. Never stored or sent to us.

This sends a real POST request and changes your account.

Use a token with only the read scope. How to make one

Was this helpful?
Open in ClaudeOpen in ChatGPT