it's not sending notifications

mdowsett - March 13, 2008 - 18:27
Project:Notify
Version:5.x-1.1
Component:User interface
Category:support request
Priority:critical
Assigned:Unassigned
Status:fixed
Description

I can "flush" the system (/admin/user/user/notify) and it sends pending notifications but cron isn't sending the notifications on it's own.

Cron does send other jobs properly...is there anything else that needs to be adjusted?

#1

tcweb - March 17, 2008 - 19:08

I am having the same problem. Any answers yet?

#2

mdowsett - March 17, 2008 - 19:19

i think after the flush, it is working. Did you try doing the flush? That almost seemed to activate it.

#3

tcweb - March 17, 2008 - 21:42

I did, and it sent the messages in queue, but not any after that. I will try it again.

#4

tcweb - March 18, 2008 - 00:56

Still doesn't work :/

#5

tcweb - March 18, 2008 - 14:24

Works now...I tried to implement a security certificate and it messed it up. Not sure how I should do that. If you have any suggestions, that would be great. Otherwise...thanks.

#6

mdowsett - March 19, 2008 - 03:58

nope - it was a mystery to me too! It's one of those things where yo u are just glad it's working! :)

#7

kriskd - March 23, 2009 - 00:03

It appears that notifications are not going out when cron runs, but will when I flush manually. I'm using the latest version of the mod 5.x-1.3. Is this still happening to others?

#8

kriskd - March 26, 2009 - 13:52

I dug into the code, figured out why this wasn't working for me and fixed it.

Here's the cron_hook:

function notify_cron() {
  $send_last = variable_get('notify_send_last', 0);
  $send_interval = variable_get('notify_send', 86400);
  $send_hour = variable_get('notify_send_hour', date('G', variable_get('notify_send_last', 0)));
  if ( (time() - $send_last > $send_interval)
    && (date('G', time()) > $send_hour)
    && ($send_interval != -1) //special case of settings to send 'never'
      ) {
    _notify_send();
    variable_set('notify_send_last', time());
  }
}

My problem was with (date('G', time()) > $send_hour). I had cron set to run once a day at 1:00am and my send hour set to 1:00am as well so this condition was never true for me. I adjusted my cron to run a few hours later than what $send_hour is set to and notification e-mails are now going out as expected.

#9

monorob - April 24, 2009 - 08:39
Priority:normal» critical

I have tried all the above solutions, still no joy. We have this working perfectly on a development server, but on the live server nothing. I have checked through the server error logs, it seems on the live server it is attempting to send from an apache@ email address, the hosts (Rackspace) have suggested this is possibly to do with the -f flag in the mail() function???

I have tried using 5x1.1 & 5x1.3 versions but neither seem to do the trick.

I have changed the Priority on this issue as this renders the module un-usesable

#10

ajzz - August 21, 2009 - 22:15

I just noticed this problem on a production server too. Some accounts had huge backlogs of non-notified content and I had to manually flush as the only way to clear the queue. This needs a fix ASAP!!!

#11

matt2000 - December 7, 2009 - 06:17
Status:active» fixed

This was fixed in the 6.x branch some time ago. I've just committed the same fix to the 5.x branch. Please test the dev version.

 
 

Drupal is a registered trademark of Dries Buytaert.