# GET /users/{name}/cron

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the cron group.

List a customer's cron jobs

- Who may call it: administrator, reseller, customer
- Token scope, any of: files, read, all
- Answers: 200 OK

UrbeStack reads the customer's crontab on each request, so jobs added at the shell appear in the response. Each job includes its ID, schedule, and command. The ID is a short hash of the job line and changes when the line changes.

The response includes the MAILTO email address. An empty value means cron sends no email. The response also includes a count of other crontab lines, such as variables and comments, which UrbeStack preserves as written. It shows whether the customer's package allows cron and how many jobs it permits.

The response gives the full path to the PHP executable for each PHP version used by the customer's sites. A job that calls plain php uses the distribution's PHP.

If the crontab is set aside because the account is suspended or the package disallows cron, UrbeStack reads the saved crontab and reports why it was set aside.

Customers can list their own jobs, resellers can list their customers' jobs, and administrators can list any customer's jobs. The token must have the files scope. The API returns 400 if name identifies an administrator, since administrators have no system account.

## As a command

- [urbestack-cron-list](https://urbestack.com/docs/commands/urbestack-cron-list.md): Lists a customer's cron jobs from crontab -u NAME -l.

## Parameters

- `name` (path, Username, required)

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X GET "$API/users/alice/cron" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "cron": {
    "allowed": true,
    "cron_tz": "text",
    "exists": true,
    "home": "text",
    "jobs": [
      {
        "command": "text",
        "day": "2026-09-09",
        "hour": "text",
        "id": 1,
        "line": 1,
        "minute": "text",
        "month": "text",
        "schedule": "text",
        "weekday": "text"
      }
    ],
    "limit": 1,
    "mail": true,
    "mailto": "text",
    "other_lines": 1,
    "php": [
      {
        "path": "public_html/index.php",
        "version": "0.0.1"
      }
    ],
    "server_time": "text",
    "set_aside": "suspended",
    "set_aside_says": "text",
    "timezone": "text",
    "user": "alice"
  }
}
```

## Errors

- 400: --user is required
- 400: <name> is an administrator: administrators have no system account, so no cron jobs
- 400: Invalid setting key
- 400: Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
- 400: Username '<value>' is reserved
- 401: Authentication required
- 404: Setting '<key>' not found
- 404: User '<user>' not found
