I'm not clear on how you're specifying an e-mail address now, because
the built in Cron resource does not have a property for it. If you
are using the 'environment' property then I think you can define a
property default within an enclosing scope:
class cronjobs {
Cron { environment => "MAILTO=
m...@mymail.com" }
cron { "mycommand":
command => "/usr/local/bin/mycommand",
hour => 3,
}
cron { "yourcommand":
command => "/usr/local/bin/yourcommand",
hour => 4,
}
}
If that works for you then I don't think you can do better.