info('RUN Command BusinessStore on Day '. $day); $timeStart = microtime(true); $this->info('RUN Command BusinessStore'); $month = $this->argument('month'); $year = $this->argument('year'); if(!$month || !$year){ $this->info('need arguments month & year'); return 0; } //$this->info('month: '.$month.' year:'.$year); for($i = 1; $i<=6; $i++){ $month = $i; $this->info('month: '.$month.' year:'.$year); $businessUsersStore = new BusinessUsersStore($month, $year); $businessUsersStore->storeUserBusinessStructure(); $businessUsersStore->storeBusinessUsersDetail(); $bool = $businessUsersStore->storeBusinessCompleted(); $diff = microtime(true) - $timeStart; $sec = intval($diff); $micro = $diff - $sec; $this->info('BusinessStore: '.$bool. ' | Time: '.$sec. 'sec :' . round($micro * 1000, 4) . " ms"); } //$this->info('END Command BusinessStore: '.$bool. ' | Time: '.$sec. 'sec :' . round($micro * 1000, 4) . " ms"); // \Log::info('Cron is running'); //return 0; } }