# Client — Cron

<a id="get-api-v1-client-cron"></a>
#### `GET /api/v1/client/cron`

*List cron jobs (client)*

Return all cron jobs owned by the authenticated client account.

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `ApiSuccess_list_dict_str__Any___` | Successful Response |

**Response example (200):**

```json
{
  "data": [
    {}
  ],
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}
```

**cURL example:**

```bash
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/client/cron
```

---

<a id="post-api-v1-client-cron"></a>
#### `POST /api/v1/client/cron`

*Create cron job (client)*

Create a new cron job for the authenticated client account.

**Body fields:**

| Field | Type | Required | Notes |
|-------|------|----------|-------|
| `command` | string | yes | maxLength=1024 |
| `day` | string | no | default `*`; maxLength=120 |
| `enabled` | boolean | no | default `True` |
| `hour` | string | no | default `*`; maxLength=120 |
| `minute` | string | no | default `*`; maxLength=120 |
| `month` | string | no | default `*`; maxLength=120 |
| `weekday` | string | no | default `*`; maxLength=120 |

**Request body example:**

```json
{
  "command": "string",
  "day": "*",
  "enabled": true,
  "hour": "*",
  "minute": "*",
  "month": "*",
  "weekday": "*"
}
```

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `ApiSuccess_dict_str__Any__` | Successful Response |
| `422` | `HTTPValidationError` | Validation Error |

**Response example (200):**

```json
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}
```

**cURL example:**

```bash
curl -X POST \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/client/cron
```

---

<a id="delete-api-v1-client-cron-cron-id"></a>
#### `DELETE /api/v1/client/cron/{cron_id}`

*Delete cron job (client)*

Delete a cron job owned by the authenticated client account.

**Path parameters:**

| Name | Type | Required | Notes |
|------|------|----------|-------|
| `cron_id` | string | yes | — |

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `MessageResponse` | Successful Response |
| `422` | `HTTPValidationError` | Validation Error |

**Response example (200):**

```json
{
  "message": "string",
  "status": "success"
}
```

**cURL example:**

```bash
curl -X DELETE \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/client/cron/{cron_id}
```

---

<a id="put-api-v1-client-cron-cron-id"></a>
#### `PUT /api/v1/client/cron/{cron_id}`

*Update cron job (client)*

Update a cron job (schedule, command, or enabled flag) owned by the authenticated client account.

**Path parameters:**

| Name | Type | Required | Notes |
|------|------|----------|-------|
| `cron_id` | string | yes | — |

**Body fields:**

| Field | Type | Required | Notes |
|-------|------|----------|-------|
| `command` | string | no | — |
| `day` | string | no | — |
| `enabled` | boolean | no | — |
| `hour` | string | no | — |
| `minute` | string | no | — |
| `month` | string | no | — |
| `weekday` | string | no | — |

**Request body example:**

```json
{
  "command": "string",
  "day": "string",
  "enabled": false,
  "hour": "string",
  "minute": "string",
  "month": "string",
  "weekday": "string"
}
```

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `ApiSuccess_dict_str__Any__` | Successful Response |
| `422` | `HTTPValidationError` | Validation Error |

**Response example (200):**

```json
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}
```

**cURL example:**

```bash
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/client/cron/{cron_id}
```

---

<a id="post-api-v1-client-cron-cron-id-run"></a>
#### `POST /api/v1/client/cron/{cron_id}/run`

*Run cron job now (client)*

Execute a cron job immediately for the authenticated client account; returns exit status.

**Path parameters:**

| Name | Type | Required | Notes |
|------|------|----------|-------|
| `cron_id` | string | yes | — |

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `ApiSuccess_dict_str__Any__` | Successful Response |
| `422` | `HTTPValidationError` | Validation Error |

**Response example (200):**

```json
{
  "data": {},
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}
```

**cURL example:**

```bash
curl -X POST \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/client/cron/{cron_id}/run
```

---
