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.
This commit is contained in:
Jose Diaz-Gonzalez committed 2026-09-30 17:01:25 -04:00
1 parent 33b70abbf1
commit f91b1f7fc7
8 files changed
+474 -62

No files matched your search

+6
View File
@@ -10,3 +10,9 @@ 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 -}}