---
title: "Create account cron job"
method: POST
path: "/api/hosting/v1/accounts/{username}/cron-jobs"
tags: ["Hosting: Cron Jobs"]
---

# Create account cron job

`POST /api/hosting/v1/accounts/{username}/cron-jobs`

Creates a cron job for the specified account from a schedule expression and a command.

Returns the created cron job, including its uid, which is required to delete the cron job or fetch its output.

## Path parameters

- `username` string, required

## Request body

- HostingV1CronJobsCreateCronJobRequest
  - `time` string, required — Cron schedule expression (for example "0 2 * * *" runs daily at 02:00).
  - `command` string, required — Command to execute on the schedule.

## Response `200`

Success response

- HostingV1CronJobsCronJobResource
  - `uid` string — Unique identifier of the cron job. Use it to delete the cron job or fetch its output.
  - `username` string — Username of the account that owns the cron job.
  - `time` string — Cron schedule expression.
  - `command` string — Command executed on the schedule.

## Other responses

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

## Changes

- **2026-06-30** `bcfaf76eec5c` — 1 info
  - endpoint added
- **2026-06-09** `d05574986eb1` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/hostinger/apis/hostinger-api/changes/api/hosting/v1/accounts/:username/cron-jobs/post.md)

---

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