Closed (fixed)
Project:
Notify
Version:
7.x-1.0-rc2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
26 Jan 2014 at 22:26 UTC
Updated:
26 May 2014 at 15:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
gisleI am unable to reproduce this.
I've set up my copy of Notify to send out notifications every three days, with sending hour set to 01:00 (i.e. I've tried to reproduce your setup). I added content at 22:00 on the third day, just 3 hours before the next batch is supposed to be sent. I then run cron. No notifications are sent.
I need more details about how to reproduce this error to track it down.
Comment #2
josean commentedHi gisle.
To reproduce the bug, just try to add some content AFTER batch was supposed to sent but wasn't because there was no new contents (for example at 9:00 in forth day) and run cron. It will send you notifications inmediately.
In this case, I expect not to receive until 01:00 of fifth day.
I hope to have explained correctly.
Comment #3
josean commentedHi gisle.
I was thinking maybe we have a diferent concept for this question. Let me explain.
In config/people/notify/queue, displayed message is
"STATUS
There are 0 nodes and 0 comments created since 26 Feb 2014 - 01:15.
No unpublished items.
No notifications queued.
Last batch: sent 187 e-mails, no failures.
The next notification is scheduled for the first cron run after 1 Mar 2014 - 01:00."
In config/people/notify:
"Send notifications every
3 days
Hour to send notifications
1"
Cron runs hourly at minute 15.
So consider my first content added after 26-feb is in 1-mar 08:30.
In this case, next cron run after 1-mar 1:00 was at 1:15 but there was no content.
When should be notified content of 1-mar 8:30?
I consider it should be sended in 2-mar 01:15.
notify alpha5 will send it at 1-mar 9:15.
Many thanks.
Comment #4
josean commentedComment #5
gisleOK, I think I understand what you mean now.
Comment #6
gisleIn the 7.x-1.0-alpha6 release: https://drupal.org/node/2218437 the logic is changed for sending notifications when the time since last notification exceeds the frequency set.
Previously, these notifications were always sent on the first possible cron run, no matter what frequency were set.
In 7.x-1.0-alpha6, the logic depends on the frequency set:
Please review.
Comment #7
gisleUpdated to the release were this is fixed.
Comment #8
josean commentedThanks Gisle.
I have just installed alpha6. In some days I will tell you if it works as expected.
Regards.
Comment #9
gisleUnfortunately, the first attempt to "fix" this (i.e. alpha6) introduced a new bug. In some cases, queued notifications are not sent at all. This is unfortunately a more serious problem than sending hour is not respected in certain cases.
As a temporary fix, download and install latest dev snapshot (commit
7ecd69b, dated April 5, 2014 7:30), or set the interval to be 12 hours or shorter.Comment #11
josean commentedHi Gisle.
I agree with you. With alpha6, notify always waits for next day and never sends.
Provisionally I activate 12 hour frequency.
Thanks,
Josean.
Comment #15
gisleI've just pushed version 7.x-1.0-alpha7 of Notify to the repo: https://drupal.org/node/2246671.
I hope this release fixes this bug.
Please review.
Comment #17
gisleUpdated to relevant version.
Comment #18
josean commentedHi Gisle.
I've tested and it works like expected. Good job!!
With this issue corrected, I think you could push Notify to a beta or working version.
Many thanks,
Josean.
Comment #19
gisleUpdated status.
Comment #20
josean commentedI'm sorry Gisle, but yesterday it DIDN'T work as expected.
Notify was configured for each 2 days, at 01:00.
New content was published at 18:25
Notify sended emails this day at 20:15
I've updated from admin/reports/updates/update.
Do I have something wrong?
Thanks!
Comment #21
gisleI am not able to reproduce this, and need more information.
After you publish content, can you look under the queue tab in the Notify admin interface and make a note of what the date and time that is the end of this line:
Notify shall not send out any notifications before this. Can you check whether it does, or whether this date and time is not what it is supposed to be?
Comment #22
josean commentedI think the message was correct and was:
"The next notification is scheduled for the first cron run after 26 Apr 2014 - 01:00"
But sended at 25 Apr - 20:15.
Now I'm looking and I can see:
"There are 7 nodes and 0 comments created since 27 Apr 2014 - 01:15.
No unpublished items.
Notifications about at least 7 items are queued.
Last batch: sent 191 e-mails, no failures.
The next notification is scheduled for the first cron run after 28 Apr 2014 - 01:00."
For the moment (27 Apr - 22:40) it is waiting for 28 Apr. Tomorrow I will tell you.
Just a 2nd question.
Now its configured for sending each 2 days at 01:00, so correct schedule day should be 29 Apr - 01:00
I give you 2 screenshots
Regards,
Josean.
Comment #23
gisleThat is corrrect.
The sentence:
means that the last notification sent were started at that time (sending may have ended some time later, because Notify may spend some time sending if there are a lot of emails to be sent).
To compute the next time to send, in your case, two days shold be added to that (taking us to 29 Apr - 01:15), and then adjusted to the correct "sending hour" ("01:00"). So the value that should have been displayed is "29 Apr 2014 - 01:00".
I'll look into this as well.
Comment #24
josean commentedHi Gisle.
I give you my conclusions in both issues, after yesterday's test.
Issue 1) Planned hour.
Today, 28-apr, notify has sended at 01:15.
This is perfect because cron is activated every hour at minute 15, so "first cron run" after 01:00 is 01:15.
So this time notify respected his planned hour.
Also, I understand your comment about "started" time. My 191 emails are sended in 2 groups, first one at 01:15 and next one at 02:15 (next cron).
To be honest, I have to tell you (I've looked for answers in system log) that in 25-Apr I logged in at 19:47 and logged out at 19:49. Messages were sended at 20:15 (instead of expected next day 01:00), so maybe I changed frequency to "hourly" and after messages were sent, to daily. Strange madness but probably this is my fault.
So please, don't waist time with this. I will make more tests and I will tell you. I really sorry for that.
Issue 2) Planned day.
Doesn't matter the configured number of days. If frequency is set to 1 or more days, notify always assumes 1 day.
I have tried different options in "settings" windows (1 day, 2 days, 3 days, 1 week, 2 weeks, 4 weeks), saving each time and "queue" window always says:
"There are 0 nodes and 0 comments created since 28 Apr 2014 - 01:15.
The next notification is scheduled for the first cron run after 29 Apr 2014 - 01:00."
Thanks and sorry again for inconveniences.
Josean
Comment #26
gisleI found some variables that may not have been initialised correctly and cause erratic behaviour. These have now been fixed and the corrected code has been released as Notify version 7.x-1.0-alpha9. Release notes: https://drupal.org/node/2253991.
I hope this release fixes this bug, and that Notify can progress to RC status.
Please review.
Comment #27
gisleLooks as if this one is fixed in 7.x-1.0-alpha9.
Feel free to reopen if this does not match your experience.
Comment #28
josean commentedHi Gisle.
After about 2 weeks of tests, I think this issue is corrected.
Many thanks for your work.
Regards,
Josean.
Comment #29
gisleSetting to correct version.