Hourly emails from Cron <[email protected]>

Since installing 2.3beta2 I have been getting hourly emails from:

Cron [email protected] /var/lib/asterisk/bin/freepbx-cron-scheduler.php

The contents of the email:

[code:1]Module Version Status


announcement 0.8.4 Enabled and up to date
asterisk-cli 1.0 Enabled and up to date
asteriskinfo 0.2.0 Enabled and up to date
backup 2.1.4.2 Enabled and up to date
blacklist Not Installed (Available online: 1.1.3)
callback Not Installed (Available online: 1.4.2.1)
callforward 1.1.1 Enabled and up to date
callwaiting 1.1.2 Enabled and up to date
cidlookup Not Installed (Available online: 1.2.1)
conferences Not Installed (Available online: 1.2.1)
configedit 1.0 Enabled; Not available online
core 2.3.0beta2.0 Online upgrade available (2.3.0beta2.1)
customerdb Not Installed (Available online: 1.2.3)
dashboard 0.2.4 Online upgrade available (0.2.5)
daynight Not Installed (Available online: 1.0.2)
dictate Not Installed (Available online: 1.1.2)
disa 2.2.1 Newer than online version (2.2)
donotdisturb 1.0.2 Enabled and up to date
featurecodeadmin 1.0.5.1 Enabled and up to date
findmefollow Not Installed (Available online: 2.4.12.3)
framework 2.3.0beta2.2 Online upgrade available (2.3.0beta2.3)
gabcast Not Installed (Available online: 1.2.4)
infoservices 1.3.4 Enabled and up to date
inventorydb Not Installed (Available online: 1.0.3)
irc 1.1.1 Enabled and up to date
ivr 2.5.15 Newer than online version (2.5.14.2)
javassh Not Installed (Available online: 1.0.1)
logfiles 1.0.1 Enabled and up to date
manager Not Installed (Available online: 1.3)
miscapps Not Installed (Available online: 0.2.2)
miscdests 1.3.4.1 Enabled and up to date
music 1.5.1.1 Enabled and up to date
paging Not Installed (Available online: 1.6.4)
parking 2.1.2 Enabled and up to date
pbdirectory Not Installed (Available online: 0.3.1)
phonebook Not Installed (Available online: 1.1.5.2)
phpagiconf Not Installed (Available online: 1.2)
phpinfo Not Installed (Available online: 1.0)
pinsets Not Installed (Available online: 1.2)
printextensions Not Installed (Available online: 1.3.1)
queues Not Installed (Available online: 2.2.10.2)
recordings 3.3.4 Enabled and up to date
ringgroups 2.2.15.2 Enabled and up to date
speeddial Not Installed (Available online: 1.0.3)
timeconditions Not Installed (Available online: 2.4.3)
voicemail 2.0.2.2 Enabled and up to date
zoip Not Installed (Available online: 0.2.0)[/code:1]

It looks like the crontab entry for the freepbx_cron_sheduler.php script is not redirecting standard output and cron by default is then emailing it out. As far as I can tell retrieve_conf.php sets up the crontab entry so I am not sure if this output is needed or not.

Can anyone confirm this as a bug or otherwise?

there’s a bug logged wrt to the crontab output - but that message should not be happening hourly. It should only check daily for online updates. It seems there may be database corruption for some reason - or some corner case in the code. I’ll have a look later and then may need more info from you.

I too am getting hourly emails. The freepbx-cron-scheduler is set to run hourly on the hour but I’ve not dug into exactly what it is doing.

C.

yes it runs hourly, but should not be checking for updates hourly, it should only be checking daily - so I’ll have to look closer.

since you are running hourly, any change you could try this fix. I think it should only send you an email now if there is an error - I would like to verify that or see if something else is creating output that would create the email. I’d rather allow it to send a cron email on error.

here is the patch for /var/www/html/admin/functions.inc.php. You should make a backup copy, then you should be able to do patch functions.inc.php this_patch_file

[code:1]
Index: functions.inc.php

— functions.inc.php (revision 4529)
+++ functions.inc.php (working copy)
@@ -448,10 +448,17 @@
}
}
// run the job

  •                   system($job['command'],$ret);
    
  •                   exec($job['command'],$job_out,$ret);
                      if ($ret) {
                              $errors++;
                              $error_arr[] = array($job['command'],$ret);
    
  •                           // If there where errors, let's print them out in case the script is being debugged or running
    
  •                           // from cron which will then put the errors out through the cron system.
    
  •                           //
    
  •                           foreach ($job_out as $line) {
    
  •                                   echo $line."\n";
    
  •                           }
                      } else {
                              $module = $job['module'];
                              $id =     $job['id'];
    

[/code:1]

ok - it was doing every hour, I had just missed it . was a bug. See bug report, will be fixed shortly:

http://freepbx.org/trac/ticket/2150

[quote=“p_lindheimer”]ok - it was doing every hour, I had just missed it . was a bug. See bug report, will be fixed shortly:

http://freepbx.org/trac/ticket/2150[/quote]

Cool! So just to be clear, it should check every hour but only report if there is an update/diff right?

Also, without the patch applied I received a spurious:

XML error: mismatched tag at line 291

via email from freepbx-cron-scheduler.php at 00:01 today. Yeah, yeah, should be tucked up in bed…