Recuring email on every Cron job

Submitted by TinWhisker on 2013-07-25

I'm testing 1.1beta2 and found an annoying 'bug'.

Exact duplication I can't document, but this is my setup:

Linux server with Apache and MySQL DB.
Upgrade order: 1.0.5->beta1->beta2.
Using both Windows and Web client.
Email send configured.
Cron triggers every minute.

Beta1 worked perfect.
We wanted to use the email box option, so I upgraded by using a fresh copy of beta2 with our existing DB.

First try, all came up ok. Configured the email box. Tested successful.

Shortly, usually after an email trigger, a mail gets sent and then continuously every time cron is called - the same email.

Second try, it stayed stable until midnight - as soon as '00:00', WebIssues sent a summary email, which then looped (so LOTS of emails this morning!)
EDIT: It was not at midnight - it happened earlier when a ticket was raised/modified.

What am I missing or what changes in job.php needs to be done?

Kind regards,

Daniel.

I'm currently re-writing the cron job, so it's quite possible that there are some bugs. Was the email that was countiniously sent an alert notification?

Regards,
Michał

Yes, you can copy the job.php from beta1 and see if it works.

By the way, were there any errors related to cron in your event log? Also, what was the configuration of the alert that generated those emails?

Regards,
Michał

I'm also having the same problem, The cron job sending same email every hour to my user.
I tried to copy job.php from beta1 but The cron job can't work it's got an error
"PHP Error: Call to undefined method System_Api_AlertManager::updateAlertStamps() in /var/www/vhosts/httpdocs/cron/job.php on line 148"

I'm also tried to restore old beta1 version but an error occurs "Wrong database version"

What should I do for this problem?

By the way thank you for creating excellent software and sorry for my bad English :)

I think I found the problem. In line 298 of system/api/alertmanager.inc.php, change:

$folderId = $alerts[ 'folder_id' ];

to this:

$folderId = $alert[ 'folder_id' ];

Now cron.php from beta2 should work fine.

Regards,
Michał