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'; }
/** * Execute the console command. * * @return mixed */ public function handle() { \Log::info('Nightly update of roster + non-compliance'); //\App\Models\Site\SiteRoster::nightlyUpdate(); \App\Http\Controllers\CronController::nightly(); }