Ejemplo n.º 1
0
 static function onceByDay()
 {
     $filename = URLLOCAL . 'var/last_date_check_triggers.txt';
     $oldDate = null;
     if (file_exists($filename)) {
         $oldDate = new clDate(file_get_contents($filename));
     } else {
         $oldDate = clDate::getInstance()->addDays(-1);
     }
     $dateToday = clDate::makeDateToday();
     file_put_contents($filename, $dateToday->getDate());
     if ($dateToday->getDifference($oldDate) > 0) {
         //eko()
         eko("une fois par jours");
         return true;
     }
     return false;
 }