---
title: "corestack_crons_get"
url: https://docs.corefinity.com/mcp/tools/corestack_crons_get
type: tool
last_updated: 2026-11-13
feature: crons
related:
  - https://docs.corefinity.com/api/reference/site-settings/get-site-crons.md
  - https://docs.corefinity.com/guides/sites/site-settings/scheduled-tasks.md
---
# corestack_crons_get

**Scheduled tasks.** A row's scheduled tasks (crons): each entry with its schedule, command and switches, the platform's built-in task, and the set's version — which corestack_crons_update needs. A command with a password or key written in it is the secret: it is hidden unless revealed. Scope: read. Also needs exec when reveal_to_agent is true. The secret opens in the person's browser; set reveal_to_agent to true to receive it yourself (needs exec).

- Scope: `read`
- Also needs `exec` when a hidden command
- Runs as a task: no
- Returns a secret only when `reveal_to_agent` is set

## When to use it

A row's scheduled tasks (crons): each entry with its schedule, command and switches, the platform's built-in task (a PHP site's runs `php cron.php` every minute when the site has a `cron.php`, and does nothing when it has none), and the set's version — which corestack_crons_update needs. A command with a password or key written in it is the secret: it is hidden unless revealed.

## Inputs

- `site_id` (integer, ≥ 1, required)
- `reveal_to_agent` (boolean, default `false`): Return the secret to you instead of opening it in the person's browser. Needs exec.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "reveal_to_agent": {
      "default": false,
      "description": "Return the secret to you instead of opening it in the person's browser. Needs exec.",
      "type": "boolean"
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "site_id"
  ],
  "type": "object"
}
```

## Refusals

- `deleted`: the site is deleted (in its grace period); restore it with corestack_site_restore_deleted first.
- `provisioning`: the site is still being created; wait for corestack_site_provisioning_get to finish.
- `scope_required`: `reveal_to_agent: true` also needs exec. Without it nothing is answered; ask the token's creator or a company owner to add it.
- The refusals every tool can answer: `invalid_arguments`, `tenant_mismatch`, `scope_required`, `pin_refused`, `rate_limited`, `temporarily_unavailable`, `internal_error` (corestack://guides/how-this-server-works).

## Example

```json
{
  "name": "corestack_crons_get",
  "arguments": {
    "site_id": 4211
  }
}
```

## After a move onto CoreStack

A site Corefinity moved onto CoreStack arrives with its old server's crontab carried, so the old schedule keeps running
here: the platform's own job (Magento's `bin/magento cron:run`, Laravel's `artisan schedule:run`, WordPress's
`wp cron event run`) as the built-in task when it ran on the built-in schedule, and every other line as an entry named
`Moved: …` with the same schedule, the new paths (`/var/www/<site>/htdocs`, `/var/www/<site>/shared`) and `php` for the
old PHP binary. They are ordinary entries: change them with corestack_crons_update like any other. A line the move could
not carry (an `@reboot` line, a path outside the site, a command the platform refuses) is not here; Corefinity tells the
person about it.

## Hidden commands

A command with a password or key written in it (`export DB_PASSWORD=…`, `mysql -p…`, a URL with a password) can no
longer be saved, but a task stored before that rule is kept as it is. Such a command is never handed to you unless you
set `reveal_to_agent`: the entry answers `"command": "[hidden: this command has a password or key written in it]"`,
`"command_hidden": true` and a `command_ref`, and the answer's `hidden_commands` lists the entries' ids and says why.
Every other entry is answered in full.

- To keep a hidden command, send its entry back to corestack_crons_update with the placeholder and the `command_ref`
  unchanged, as you read them: the task keeps its stored command, and you can still change its name, schedule or
  switches.
- To change it, write the whole new command in `command`. It is checked like any new command, so a password or key
  written in it is refused: read the value from a file on the site instead.
- The person sees these commands on the site's Scheduled tasks tab in the Control Panel. Set `reveal_to_agent` to true
  only when they ask you to read them: it needs exec, and a token without exec asks the person to allow it first (a
  step-up).

## Prompt

```text
Using the Corefinity MCP server, call corestack_crons_get with site_id 4211. (Scheduled tasks.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [GET /api/corestack/sites/{site}/crons](https://docs.corefinity.com/api/reference/site-settings/get-site-crons.md)
- Guide: [Scheduled tasks](https://docs.corefinity.com/guides/sites/site-settings/scheduled-tasks.md)
