From 3f8c868ab856eeee82c1e9d433694e3f205c45cb Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 13 Nov 2025 01:53:33 -0500 Subject: [PATCH] fix: ensure the concurrency policy is propagated when running a cron command directly --- plugins/cron/subcommands.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/cron/subcommands.go b/plugins/cron/subcommands.go index c46ba4771..8bc86677f 100644 --- a/plugins/cron/subcommands.go +++ b/plugins/cron/subcommands.go @@ -112,9 +112,11 @@ func CommandRun(appName string, cronID string, detached bool) error { } command := "" + concurrencyPolicy := "allow" for _, task := range tasks { if task.ID == cronID { command = task.Command + concurrencyPolicy = task.ConcurrencyPolicy } } @@ -134,6 +136,7 @@ func CommandRun(appName string, cronID string, detached bool) error { os.Setenv("DOKKU_DISABLE_TTY", "true") } + os.Setenv("DOKKU_CONCURRENCY_POLICY", concurrencyPolicy) os.Setenv("DOKKU_CRON_ID", cronID) os.Setenv("DOKKU_RM_CONTAINER", "1") scheduler := common.GetAppScheduler(appName)