From 75e57c66dd49c55acb29d31693ddd022032b54fb Mon Sep 17 00:00:00 2001 From: horus Date: Fri, 6 Mar 2020 01:27:13 +0100 Subject: Scheduled commands are OK. --- app/Console/Kernel.php | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'app/Console') diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 1f24208..4e125a3 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -30,21 +30,27 @@ class Kernel extends ConsoleKernel { // $schedule->command('inspire') // ->hourly(); + + $schedule->call( function(){ + $background = new Background(); + $background->saveAnimeStats(); + })->dailyAt('23:00'); + + $schedule->call( function(){ + $background = new Background(); + $background->saveSeason(); + sleep(10); + $background->checkIfIsAiring(); + sleep(10); + $background->saveAiringForAll(); + })->dailyAt('19:00'); + $schedule->call( function(){ - #$season = new AnimeSeason(); - #$season->save(); - - #$background = new Background(); - #$background->saveSeason(); - #$background->saveAnimeStats(); - #$background->saveAiringForAll(); - $helper = new Helper(); - $helper->createUser( 'll-' ); - $helper->setIsWatching( 'll-' ); - $helper->setCalendar( 'll-' ); -#$background->checkIfIsAiring(); - }); + #$helper->createUser( 'll-' ); + $helper->setIsWatchingForAll(); + $helper->setCalendarForAll(); + })->dailyAt('18:30'); } /** -- cgit v1.2.3