23 lines
465 B
PHP
23 lines
465 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use Illuminate\Console\Command;
|
|
|
|
class Scheduler extends Command
|
|
{
|
|
protected $signature = 'start:scheduler';
|
|
|
|
protected $description = 'Start Scheduler';
|
|
|
|
public function handle()
|
|
{
|
|
if (config('constants.horizon.is_scheduler_enabled')) {
|
|
$this->info('Scheduler is enabled on this server.');
|
|
$this->call('schedule:work');
|
|
exit(0);
|
|
}
|
|
exit(0);
|
|
}
|
|
}
|