Author Topic: cron - next message to send  (Read 4358 times)

chief

  • Posts: 37
    • View Profile
cron - next message to send
« on: November 19, 2007, 06:22:10 am »
Is there a way to look somewhere to figure out what the next message the cron is qued to send?

I know I can look at the user database - delay column- and when it is  - 0 - the cron wil send the message at the skd. time.

but - is it possible to look somewhere in the cron code to actually see the code that the cron will execute.?
Thanks

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
cron - next message to send
« Reply #1 on: November 20, 2007, 04:30:59 am »
You know when delay is 0 the message will be sent next dailymail.  I believe you are asking if there is a way to see when "Cron-style Followups" are due to be sent - is that right?  Currently this is not possible and it would take a fair custom script to achieve it.  You can find the code in the dailymail.php file...
Code: [Select]
include('./cron.php');
  $cr = new cron;
  $now = date("Ymd",time());

Code: [Select]
        while(list($mid,$cron)=mysql_fetch_row($result5)){
          if($cron){
           $cr->calcLastRan("* * ".$cron);
           $due = date("Ymd",$cr->getLastRanUnix()-1);
           if($now == $due){
            $sendids[] = $mid;
            if($DEBUG) echo " Delay is 0 and cron is due on the new message - sending!<br>";
           }
          }

If you know PHP you could create a script to look ahead a number of days and run the cron test for each followup...  This could further be cross-referenced with users, but it is definitely a non-trivial job!

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting