Simplified templates by using the default Smarty escape calls.
[timetracker.git] / cron.php
index 345ddd3..7be547d 100644 (file)
--- a/cron.php
+++ b/cron.php
@@ -71,7 +71,8 @@ while ($val = $res->fetchRow()) {
     echo "Error while emailing report...<br>";
 
   // Calculate next execution time.
-  $next = tdCron::getNextOccurrence($val['cron_spec'], $now); 
+  $next = tdCron::getNextOccurrence($val['cron_spec'], $now + 60); // +60 sec is here to get us correct $next when $now is close to existing "next".
+                                                                   // This is because the accuracy of tdcron class appears to be 1 minute.
 
   // Update last and next values in tt_cron.
   $sql = "update tt_cron set last = $now, next = $next where id = ".$val['id'];