Files
dokku/plugins/cron/templates/cron.tmpl
T
Jose Diaz-Gonzalez f91b1f7fc7 feat: allow cron-entries to set a per-entry MAILTO
The `cron-entries` trigger is now passed `json` as a second argument, and plugins may print each task as a json object on its own line. A task that sets a `mailto` is written to the crontab under a `MAILTO` of its own, and its output is mailed to that address as well as appended to its log file, so plugins such as the datastore plugins can have the output of a specific scheduled task mailed to a specific person.
2026-09-30 17:01:25 -04:00

19 lines
415 B
Cheetah

{{ if .Mailfrom -}}
MAILFROM={{ .Mailfrom }}
{{ end -}}
{{ if .Mailto -}}
MAILTO={{ .Mailto }}
{{ end -}}
PATH=/usr/local/bin:/usr/bin:/bin
SHELL=/bin/bash
{{ range $task := .Tasks -}}
{{ $task.Schedule }} {{ $task.DokkuRunCommand }}
{{ end -}}
{{ range $group := .MailtoGroups }}
MAILTO={{ $group.Mailto }}
{{ range $task := $group.Tasks -}}
{{ $task.Schedule }} {{ $task.DokkuRunCommand }}
{{ end -}}
{{ end -}}