Example #1
0
 public static function nightly()
 {
     echo "<h1> Nightly Update</h1>";
     $log = "Nightly Update\n--------------\n\n";
     $bytes_written = File::put(public_path('filebank/log/nightly/' . Carbon::now()->format('Ymd') . '.txt'), $log);
     if ($bytes_written === false) {
         die("Error writing to file");
     }
     CronController::nonattendees();
     CronController::roster();
     echo "<h1> ALL DONE </h1>";
     echo '<br>Logfile filebank/log/nightly/' . Carbon::now()->format('Ymd') . '.txt';
 }