command('inspire') // ->hourly(); $schedule->call( function(){ $background = new Background(); $background->saveAnimeStats(); })->everyThirtyMinutes()->name('saveStats')->withoutOverlapping(); #})->everyThirtyMinutes()->name('saveStats5')->withoutOverlapping(); #})->everyMinute()->name('saveStats3')->withoutOverlapping(); #})->everyMinute()->name('saveStats5')->withoutOverlapping(); $schedule->call( function(){ $background = new Background(); echo "SaveSeason(): \n"; $background->saveSeason(); sleep(10); echo "\ncheckIfIsAiring(): \n"; $background->checkIfIsAiring(); sleep(10); echo "\nsaveAiringForAll(): \n"; $background->saveAiringForAll(); })->dailyAt('18:00'); #})->everyMinute(); $schedule->call( function(){ $helper = new Helper(); #$helper->createUser( 'll-' ); echo "setIsWatchingForAll(): \n"; $helper->setIsWatchingForAll(); echo "\nsetCalendarForAll(): \n"; $helper->setCalendarForAll(); })->twiceDaily(7, 19); #})->everyMinute(); $schedule->call( function(){ $background = new Background(); echo "saveTopAnime()\n"; $background->saveTopAnime(); echo "saveTopAnimeByPopularity()\n"; $background->saveTopAnimeByPopularity(); echo"saveEnhancementForAll()\n"; $background->saveEnhancementForAll(); echo "addSeasonToAllAnime()\n"; $background->addSeasonToAllAnime(); })->weeklyOn(1, '15:30')->name('saveTopAnime')->withoutOverlapping(); #})->everyMinute(); /* $schedule->call( function(){ $background = new Background(); #$background->checkIfIsAiring(); #$background->saveSeason(); #$background->saveEnhancementForAll(); #$background->addSeasonToAllAnime(); #$anime = Anime::where('mal_id', 40591)->get()->first(); #$background->saveAiring( $anime ); })->everyMinute()->name("enhance6")->withoutOverlapping(); #})->twiceDaily(9, 23); */ /* $schedule->call( function(){ $background = new Background(); #$background->checkIfIsAiring(); $background->saveTopAnimeByPopularity(); #$anime = Anime::where('mal_id', 40591)->get()->first(); #$background->saveAiring( $anime ); #})->everyMinute()->name('saveTopAnime2')->withoutOverlapping(); })->dailyAt('3:00')->name('saveTopAnimeByPopularity')->withoutOverlapping(); #})->everyMinute()->name('saveTopAnimeByPopularity2')->withoutOverlapping(); */ } /** * Register the commands for the application. * * @return void */ protected function commands() { $this->load(__DIR__.'/Commands'); require base_path('routes/console.php'); } }