Add (ui)
This commit is contained in:
@@ -4,11 +4,10 @@
|
||||
|
||||
use App\Jobs\BrowseAndWriteWithAIJob;
|
||||
use App\Jobs\PublishIndexPostJob;
|
||||
use App\Models\Post;
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
||||
use App\Models\Post;
|
||||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
/**
|
||||
@@ -22,10 +21,9 @@ protected function schedule(Schedule $schedule): void
|
||||
})->dailyAt('00:00');
|
||||
|
||||
$schedule->call(function () {
|
||||
$future_post = Post::whereNotNull('published_at')->where('status','future')->where('published_at', '>=', now())->orderBy('published_at','ASC')->first();
|
||||
|
||||
PublishIndexPostJob::dispatch($future_post->id)->onQueue('default')->onConnection('default');
|
||||
$future_post = Post::whereNotNull('published_at')->where('status', 'future')->where('published_at', '>=', now())->orderBy('published_at', 'ASC')->first();
|
||||
|
||||
PublishIndexPostJob::dispatch($future_post->id)->onQueue('default')->onConnection('default');
|
||||
|
||||
})->everyMinute();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user