diffInDays($launched_date) + 1; $posts_to_generate = get_exponential_posts_gen_by_day($days_since_launch); $mins_betwween_posts = floor((24 * 60) / $posts_to_generate); $schedule->call(function () { AISerpGenArticleJob::dispatch()->onQueue('default')->onConnection('default'); })->everyMinutes($mins_betwween_posts)->when(function () use ($mins_betwween_posts) { return now()->minute % $mins_betwween_posts === 0; }); } /** * Register the commands for the application. */ protected function commands(): void { $this->load(__DIR__.'/Commands'); require base_path('routes/console.php'); } }