feat: add the ability to specify a custom mailto for all cron output

This commit is contained in:
Jose Diaz-Gonzalez
2023-08-19 23:59:00 -04:00
parent a433508fb1
commit c23e878e7d
12 changed files with 187 additions and 5 deletions

View File

@@ -112,3 +112,13 @@ func CommandRun(appName string, cronID string, detached bool) error {
args := append([]string{scheduler, appName, "0"}, fields...)
return common.PlugnTrigger("scheduler-run", args...)
}
// CommandSet set or clear a cron property for an app
func CommandSet(appName string, property string, value string) error {
if err := validateSetValue(appName, property, value); err != nil {
return err
}
common.CommandPropertySet("cron", appName, property, value, DefaultProperties, GlobalProperties)
return common.PlugnTrigger("cron-write")
}