DataObjects/Core_notify_recur.php
[Pman.Core] / Notify.php
index 84d3c4a..ad06b16 100644 (file)
@@ -16,7 +16,13 @@ require_once 'Pman.php';
 class Pman_Core_Notify extends Pman
 {
     
-    static $cli_desc = "Send out notification emails (usually from cron)";
+    static $cli_desc = "Runs the notification queue (usually from cron)
+                        Normally used to sends out emails to anyone in the notification list.
+    
+                        /etc/cron.d/pman-core-notify
+                        * *  * * *     www-data     /usr/bin/php /home/gitlive/web.mtrack/admin.php  Core/Notify > /dev/null
+    
+";
     
     static $cli_opts = array(
         'debug' => array(
@@ -120,8 +126,10 @@ class Pman_Core_Notify extends Pman
             
             // standard
             
-            $w->whereAdd('act_when > sent'); // eg.. sent is not valid..
-            $w->whereAdd('act_start > NOW() - INTERVAL 14 DAYS'); // ignore the ones stuck in the queue
+            //$w->whereAdd('act_when > sent'); // eg.. sent is not valid..
+            $w->whereAdd("sent < '1970-01-01'"); // eg.. sent is not valid..
+            
+            $w->whereAdd('act_start > NOW() - INTERVAL 14 DAY'); // ignore the ones stuck in the queue
             if (!$this->force) {
                 $w->whereAdd('act_when < NOW()'); // eg.. not if future..
             }