From b598af67b944606abef7e887e8140d204da9a571 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Fri, 7 Nov 2025 22:32:44 -0500 Subject: [PATCH] refactor: rename CronCommand to DokkuRunCommand This better reflects what it does. --- plugins/cron/cron.go | 4 ++-- plugins/cron/templates/cron.tmpl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/cron/cron.go b/plugins/cron/cron.go index f5a74e0bd..6d0025ff7 100644 --- a/plugins/cron/cron.go +++ b/plugins/cron/cron.go @@ -54,8 +54,8 @@ type TemplateCommand struct { Maintenance bool `json:"maintenance"` } -// CronCommand returns the command to run for a given cron command -func (t TemplateCommand) CronCommand() string { +// DokkuRunCommand returns the dokku run command to execute for a given cron task +func (t TemplateCommand) DokkuRunCommand() string { if t.AltCommand != "" { if t.LogFile != "" { return fmt.Sprintf("%s &>> %s", t.AltCommand, t.LogFile) diff --git a/plugins/cron/templates/cron.tmpl b/plugins/cron/templates/cron.tmpl index c38d40499..3f186e97b 100644 --- a/plugins/cron/templates/cron.tmpl +++ b/plugins/cron/templates/cron.tmpl @@ -8,5 +8,5 @@ PATH=/usr/local/bin:/usr/bin:/bin SHELL=/bin/bash {{ range $task := .Commands -}} -{{ $task.Schedule }} {{ $task.CronCommand }} +{{ $task.Schedule }} {{ $task.DokkuRunCommand }} {{ end -}}