---
title: "Schedule Weekly Cron Tasks"
method: POST
path: "/api/cron-tasks/admin/schedule-weekly"
tags: ["cron-tasks"]
---

# Schedule Weekly Cron Tasks

`POST /api/cron-tasks/admin/schedule-weekly`

Weekly cron job endpoint to schedule next_run_at for all weekly tasks.
Should be called once per week (e.g., Sunday midnight UTC).

Queues a Celery task to:
- Fetch all active weekly tasks
- Calculate next_run_at based on user timezone + schedule_day + schedule_time
- Update next_run_at in database

Requires x-api-key header for authentication.

## Headers

- `x-api-key` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/usecreed/apis/creed-api.md) · [All operations](https://skmtc.net/usecreed/apis/creed-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/usecreed/creed-api/versions/523833f9e819/schema)
