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

**Check a scheduled task.** Check a cron schedule and / or command before saving it: when it would next run, warnings, and anything the platform refuses. Nothing is saved. Scope: read.

- Scope: `read`
- Runs as a task: no

## When to use it

Check a cron schedule and / or command before saving it: when it would next run, warnings, and anything the platform refuses. Nothing is saved.

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) answers `valid: false` with the reason in `errors.command`, because the command is stored with the scheduled task, and `corestack_crons_update` refuses it (`invalid_arguments`). The placeholder corestack_crons_get shows for a hidden command (`[hidden: …]`) is not a command either: it answers `valid: false` with the same reason the update gives. A command one of the site's tasks already has, checked unchanged, answers `valid: true` with a warning in `warnings`: it is kept when it is saved back unchanged. 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`.

## Inputs

- `site_id` (integer, ≥ 1, required)
- `schedule` (string, up to 200 characters): A five-field cron schedule or a preset such as @daily.
- `command` (string, up to 20000 characters): The command, run as the site's web user.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "command": {
      "description": "The command, run as the site's web user.",
      "maxLength": 20000,
      "type": "string"
    },
    "schedule": {
      "description": "A five-field cron schedule or a preset such as @daily.",
      "maxLength": 200,
      "type": "string"
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "site_id"
  ],
  "type": "object"
}
```

## Refusals

- 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_validate",
  "arguments": {
    "site_id": 4211,
    "schedule": "*/15 * * * *",
    "command": "php bin/magento cron:run"
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_crons_validate with site_id 4211, schedule */15 * * * *, command php bin/magento cron:run. (Check a scheduled task.) Tell me what it returned.
```

## The same task elsewhere

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