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

corestack_crons_update

Change scheduled tasks.

Scope writeAsks you to confirmRuns as a taskNo secrets returnedCoreCluster
On this page

When to use it

Replace a row's whole set of scheduled tasks: send every entry you want to keep — entries left out are removed — with the version corestack_crons_get answered.

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_crons_update with site_id 4211, version 3, enabled true, entries [{"label":"Deploy key","schedule":"*/15 * * * *","command":"php -v","enabled":true,"no_overlap":false,"timeout":900}]. (Change scheduled tasks.) Tell me what it returned.

Inputs

builtin_enabledboolean or null

The built-in task's switch; absent or null keeps it.

confirm_labelsarray of stringsConfirmation

Removing entries: the exact label of each entry left out, as the person typed it. Up to 49 items.

enabledbooleanRequired

Scheduled tasks on or off for the row.

entriesarray of objectsRequired

Up to 49 items.

Fields of each item
commandstringRequired

Up to 20,000 characters.

command_refstring or null

A hidden command's command_ref from corestack_crons_get: keeps its command. Up to 64 characters.

enabledbooleanRequired
idinteger or null

An existing entry's id; leave it out (or null) for a new entry. At least 1.

labelstringRequired

Up to 60 characters.

no_overlapbooleanRequired
schedulestringRequired

Up to 200 characters.

timeoutintegerRequired

Seconds.

900360021600
site_idintegerRequired

At least 1.

versionintegerRequired

The set's version from corestack_crons_get. At least 0.

Your assistant fills in a confirmation only after you agree.

Example call

tools/call
{
  "name": "corestack_crons_update",
  "arguments": {
    "site_id": 4211,
    "version": 3,
    "enabled": true,
    "entries": [
      {
        "label": "Deploy key",
        "schedule": "*/15 * * * *",
        "command": "php -v",
        "enabled": true,
        "no_overlap": false,
        "timeout": 900
      }
    ]
  }
}

If it is refused

ReasonWhat to do
staleThe object changed since you read it; read it again and call with the new version. A command_ref that no longer matches its task (the command changed, or the task went) answers stale too.
confirm_mismatchRemoving entries can need their labels: an entry left out whose exact label is not in confirm_labels is refused and nothing changes. The answer's labels lists every label to send; ask the person to type each one. Turning an entry, the built-in task or the whole set off removes nothing and needs no labels.
invalid_argumentsA command with a password or key written in it (export DB_PASSWORD=…, mysql -p…, curl -u user:…, --password=…, an Authorization: Bearer … header, a URL with a password) is refused and nothing changes, because the command is stored with the scheduled task: fields names the entry, entries.<i>.command, with the reason. An entry the site already stores is kept when its command is sent back unchanged, so it never blocks changes to the others, and its warning is in the answer's warnings (or in the task's status message when a change starts). Put the value in a file on the site and read it from there instead, for example set -a; . /var/www/shop.example.com/shared/.env.cron; set +a; php bin/magento my:job.
managed_elsewhereAnother control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done.
tenant_mismatchThe object does not exist or the token may not see it. Check the id.
scope_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
pin_refusedThe grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it.
rate_limitedToo many calls. Wait for the number of seconds the answer names.
temporarily_unavailableThe Control Panel could not answer just now. Nothing was started; try again shortly.
internal_errorSomething went wrong on our side. Quote the trace id to support.

Hidden commands

corestack_crons_get hides a stored command that has a password or key written in it: the entry's command is [hidden: this command has a password or key written in it] and it carries a command_ref. Send that entry back with both unchanged and the task keeps its stored command, even when you change its name, schedule or switches. Write a whole new command to change it: it is checked like any new command (and its command_ref is ignored). The placeholder is never saved as a command. The set this tool answers hides the same commands, with fresh command_refs.

The same task elsewhere

Was this helpful?
Open in ClaudeOpen in ChatGPT