[MKDoc-commit] Changed script to mail reminders when 96 hours are left.

sam at mkdoc.demon.co.uk sam at mkdoc.demon.co.uk
Wed May 10 04:49:54 BST 2006


Log Message:
-----------
Changed script to mail reminders when 96 hours are left.

Tags:
----
mkdoc-1-6

Modified Files:
--------------
    mkd/tools:
        ufi_survey_mailer.pl

-------------- next part --------------
Index: ufi_survey_mailer.pl
===================================================================
RCS file: /var/spool/cvs/mkd/tools/Attic/ufi_survey_mailer.pl,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -Ltools/ufi_survey_mailer.pl -Ltools/ufi_survey_mailer.pl -u -r1.1.2.9 -r1.1.2.10
--- tools/ufi_survey_mailer.pl
+++ tools/ufi_survey_mailer.pl
@@ -25,7 +25,7 @@
 # ------------------------------------------------------------------
 
 # This script sends reminder emails to centre administrators when a
-# survey is 24 hours from finished and they haven't filled it out.  It
+# survey is 96 hours from finished and they haven't filled it out.  It
 # should be run once a day from cron.  NOTE: running it more often
 # than once a day will result in duplicate emails!
 
@@ -103,12 +103,12 @@
 main();
 
 sub main {
-    # send reminders when 24 to 48 hours remain
+    # send reminders when 3 to 4 days remain
     if (my $current = current_survey()) {
         my $diff = $current->{end_date} - DateTime->now();
         my ($years, $months, $days) = 
           $diff->in_units('years', 'months', 'days');
-        if ($years == 0 and $months == 0 and $days == 1) {
+        if ($years == 0 and $months == 0 and $days == 3) {
             send_reminders($current);
         }
     }


More information about the MKDoc-commit mailing list