corestack_ crons_ update
Change scheduled tasks.
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
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
The built-in task's switch; absent or null keeps it.
Removing entries: the exact label of each entry left out, as the person typed it. Up to 49 items.
Scheduled tasks on or off for the row.
Up to 49 items.
Fields of each item
Up to 20,000 characters.
A hidden command's command_ref from corestack_crons_get: keeps its command. Up to 64 characters.
An existing entry's id; leave it out (or null) for a new entry. At least 1.
Up to 60 characters.
Up to 200 characters.
Seconds.
900360021600At least 1.
The set's version from corestack_crons_get. At least 0.
Your assistant fills in a confirmation only after you agree.
Example 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
| Reason | What to do |
|---|---|
stale | The 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_mismatch | Removing 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_arguments | A 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; . /. |
managed_elsewhere | Another 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_mismatch | The object does not exist or the token may not see it. Check the id. |
scope_required | The token lacks a scope this call needs. Open the link in the answer to add it, then call again. |
pin_refused | The 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_limited | Too many calls. Wait for the number of seconds the answer names. |
temporarily_unavailable | The Control Panel could not answer just now. Nothing was started; try again shortly. |
internal_error | Something 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.