lasthourcloud/app/Console/Commands/Scheduler.php

24 lines
471 B
PHP
Raw Normal View History

<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class Scheduler extends Command
{
protected $signature = 'start:scheduler';
2024-06-10 20:43:34 +00:00
protected $description = 'Start Scheduler';
2024-06-10 20:43:34 +00:00
public function handle()
{
if (config('coolify.is_scheduler_enabled')) {
$this->info('Scheduler is enabled. Starting.');
$this->call('schedule:work');
exit(0);
} else {
exit(0);
}
}
}