---
title: "Create website cron job"
method: POST
path: "/api/agency-hosting/v1/websites/{website_uid}/cron-jobs"
tags: ["Agency Hosting: Cron Jobs"]
---

# Create website cron job

`POST /api/agency-hosting/v1/websites/{website_uid}/cron-jobs`

Creates a cron job for an Agency Plan website from a schedule expression and a command.

Returns the created cron job, including its uuid, which is required to delete the cron job.

## Path parameters

- `website_uid` string, required

## Request body

- AgencyHostingV1WebsitesCronJobsCreateCronJobRequest
  - `time` string, required — Cron schedule expression (standard 5-field crontab syntax).
  - `command` string, required — Command to run on the schedule. Must not contain pipe (|) or redirection (<, >) characters.

## Response `200`

Success response

- AgencyHostingV1WebsitesCronJobsCronJobResource
  - `uuid` string — Unique identifier of the cron job. Use it to delete the cron job.
  - `time` string — Cron schedule expression.
  - `command` string — Command executed on the configured schedule.
  - `created_at` string, date-time — Cron job creation timestamp.

## Other responses

- `401` — Unauthenticated response
- `422` — Validation error response
- `500` — Error response

---

[API](https://skmtc.net/hostinger/apis/hostinger-api.md) · [All operations](https://skmtc.net/hostinger/apis/hostinger-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hostinger/hostinger-api/revisions/0692bdc8e675/schema)
