From d72c183d9e4cfa60e20656960ee5c007502d4f21 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 21 Sep 2025 18:00:07 -0400 Subject: [PATCH] feat: add ability to specify a concurrency policy for crons in the app.json file --- docs/appendices/file-formats/app-json.md | 1 + plugins/app-json/appjson.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/docs/appendices/file-formats/app-json.md b/docs/appendices/file-formats/app-json.md index c7500e19f..842674376 100644 --- a/docs/appendices/file-formats/app-json.md +++ b/docs/appendices/file-formats/app-json.md @@ -23,6 +23,7 @@ - `command`: (string, required) - `maintenance`: (boolean, optional) - `schedule`: (string, required) +- `concurrency_policy`: (string, optional, default: `allow`, options: `allow`, `deny`, `replace`) ## Formation diff --git a/plugins/app-json/appjson.go b/plugins/app-json/appjson.go index 99c856bc5..fe59c9942 100644 --- a/plugins/app-json/appjson.go +++ b/plugins/app-json/appjson.go @@ -60,6 +60,9 @@ type CronTask struct { // Schedule is the cron schedule to execute the command on Schedule string `json:"schedule"` + + // ConcurrencyPolicy is the concurrency policy for the cron command + ConcurrencyPolicy string `json:"concurrency_policy"` } // Formation is a struct that represents the scale for a process from an app.json file