cloudflare / cloudflare/developer-platform

Wrangler cannot clear Cron Triggers when account is above free-plan limit (10072)

Aperta
#38 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Nessun dato sulla lingua
Stelle
1
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### What happened?

An account has 8 existing Cron Triggers that predate/enforce beyond the current Free-plan limit of 5. I need to reduce the account to 2 triggers. Deploying a Worker with `crons = []` fails with error 10072 instead of removing that Worker's existing schedules. The direct API equivalent also fails:

```http
PUT /accounts//workers/scripts//schedules
Content-Type: application/json

[]
```

Response:

```text
10072: This account has reached the Workers Free limit of 5 cron triggers per account.
```

Because every schedule update is rejected while the account is above the limit, there is no non-destructive way to get back under the limit. Omitting `triggers` leaves schedules unchanged, and the API exposes no individual schedule-delete operation.

### Reproduction

1. Have an account with more than 5 existing triggers (for example, grandfathered schedules).
2. Configure one Worker with:

```toml
[triggers]
crons = []
```

3. Run `wrangler deploy`.
4. The Worker code uploads, but updating `/schedules` fails with 10072.

### Expected behavior

A schedule update that reduces the account-wide trigger count, especially `[]`, should be allowed even when the current count is above the plan limit. Capacity enforcement should reject only net additions.

### Wrangler versions

Observed with Wrangler 4.56.0 and 4.69.0 on Node 22 / macOS. The same failure occurs via the REST API, so this appears to be an API-side limit check rather than Wrangler-only behavior.

### Workaround impact

The only apparent workaround is deleting whole Worker scripts, which also destroys script-scoped secrets and creates avoidable downtime. The Cloudflare documentation says `crons = []` is the supported way to remove all triggers.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con il percorso di deploy di Wrangler che aggiorna le pianificazioni del Worker e confrontalo con PUT /accounts//workers/scripts//schedules. Riproduci la risposta 10072 usando crons = [] per un account oltre il limite; il lavoro è completato quando le riduzioni, inclusa [], hanno esito positivo, mentre le aggiunte nette restano soggette al limite.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
node.js
Ambito
api, cloud
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.