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.
19 lines
415 B
Cheetah
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 -}}
|