feat: add the ability to specify a custom mailto for all cron output
This commit is contained in:
@@ -13,6 +13,7 @@ func ReportSingleApp(appName string, format string, infoFlag string) error {
|
||||
}
|
||||
|
||||
flags := map[string]common.ReportFunc{
|
||||
"--cron-mailto": reportMailto,
|
||||
"--cron-task-count": reportTasks,
|
||||
}
|
||||
|
||||
@@ -27,6 +28,10 @@ func ReportSingleApp(appName string, format string, infoFlag string) error {
|
||||
return common.ReportSingleApp("cron", appName, infoFlag, infoFlags, flagKeys, format, trimPrefix, uppercaseFirstCharacter)
|
||||
}
|
||||
|
||||
func reportMailto(_ string) string {
|
||||
return common.PropertyGet("cron", "--global", "mailto")
|
||||
}
|
||||
|
||||
func reportTasks(appName string) string {
|
||||
c, _ := FetchCronEntries(appName)
|
||||
return strconv.Itoa(len(c))
|
||||
|
||||
Reference in New Issue
Block a user