|
@@ -17,6 +17,7 @@ use App\Console\Commands\UpdateReplyCount;
|
|
use App\Console\Commands\UpdateTopicData;
|
|
use App\Console\Commands\UpdateTopicData;
|
|
use App\Console\Commands\UpdateTopicUseCount;
|
|
use App\Console\Commands\UpdateTopicUseCount;
|
|
use App\Console\Commands\VirusAdd;
|
|
use App\Console\Commands\VirusAdd;
|
|
|
|
+use App\Console\Commands\YesterdayGreatPost;
|
|
use Illuminate\Console\Scheduling\Schedule;
|
|
use Illuminate\Console\Scheduling\Schedule;
|
|
use Laravel\Lumen\Console\Kernel as ConsoleKernel;
|
|
use Laravel\Lumen\Console\Kernel as ConsoleKernel;
|
|
|
|
|
|
@@ -42,18 +43,19 @@ class Kernel extends ConsoleKernel
|
|
UpdateTopicData::class,
|
|
UpdateTopicData::class,
|
|
TopicUseCount::class,
|
|
TopicUseCount::class,
|
|
CommunityMemberStatistics::class,
|
|
CommunityMemberStatistics::class,
|
|
- MusicImport::class
|
|
|
|
|
|
+ MusicImport::class,
|
|
|
|
+ YesterdayGreatPost::class
|
|
];
|
|
];
|
|
|
|
|
|
/**
|
|
/**
|
|
* Define the application's command schedule.
|
|
* Define the application's command schedule.
|
|
*
|
|
*
|
|
- * @param \Illuminate\Console\Scheduling\Schedule $schedule
|
|
|
|
|
|
+ * @param \Illuminate\Console\Scheduling\Schedule $schedule
|
|
* @return void
|
|
* @return void
|
|
*/
|
|
*/
|
|
protected function schedule(Schedule $schedule)
|
|
protected function schedule(Schedule $schedule)
|
|
{
|
|
{
|
|
- $path = storage_path('logs/'.date('Y-m-d').'-schedule.log');
|
|
|
|
|
|
+ $path = storage_path('logs/' . date('Y-m-d') . '-schedule.log');
|
|
|
|
|
|
$schedule->command('download:download')
|
|
$schedule->command('download:download')
|
|
->everyMinute()
|
|
->everyMinute()
|
|
@@ -69,6 +71,10 @@ class Kernel extends ConsoleKernel
|
|
$schedule->command('member:statistics')
|
|
$schedule->command('member:statistics')
|
|
->dailyAt('00:05')
|
|
->dailyAt('00:05')
|
|
->withoutOverlapping()->appendOutputTo($path);
|
|
->withoutOverlapping()->appendOutputTo($path);
|
|
|
|
+ //统计前一天最佳内容
|
|
|
|
+ $schedule->command('post:yesterday-great')
|
|
|
|
+ ->dailyAt('00:30')
|
|
|
|
+ ->withoutOverlapping()->appendOutputTo($path);
|
|
//内容生成U米
|
|
//内容生成U米
|
|
$schedule->command('post:create_bean')
|
|
$schedule->command('post:create_bean')
|
|
->everyFiveMinutes()
|
|
->everyFiveMinutes()
|