summaryrefslogtreecommitdiff
path: root/app/Console
diff options
context:
space:
mode:
authorhorus2020-03-06 01:27:13 +0100
committerhorus2020-03-06 01:27:13 +0100
commit75e57c66dd49c55acb29d31693ddd022032b54fb (patch)
tree8940e82443b477578a5f583f8cd7013c0f898e33 /app/Console
parent2edac1f5607839efc70be2d98237a6de4b28d6d8 (diff)
downloadsenpai-75e57c66dd49c55acb29d31693ddd022032b54fb.tar.gz
Scheduled commands are OK.
Diffstat (limited to 'app/Console')
-rw-r--r--app/Console/Kernel.php32
1 files changed, 19 insertions, 13 deletions
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');
}
/**