fixed to include the 'use' of 'emailreports' module in the main loop

This commit is contained in:
Jordi Sanfeliu 2013-07-18 12:54:34 +02:00
parent 26b6425ec8
commit 88b159ed28
1 changed files with 6 additions and 0 deletions

View File

@ -536,6 +536,12 @@ while(1) {
# at 00:00h
if($min == 0 && $hour == 0) {
eval "use emailreports qw(emailreports_send)";
if($@) {
logger("WARNING: unable to find module 'emailreports'");
next;
}
# daily
if(lc($emailreports->{daily}->{enabled}) eq "y") {
eval { emailreports::emailreports_send(\%config, "daily", "1day", $d); };