39 lines
796 B
PHP
39 lines
796 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Console\Commands;
|
||
|
|
|
||
|
|
use App\Jobs\AutoCloseOldTickets as JobsAutoCloseOldTickets;
|
||
|
|
use Illuminate\Console\Command;
|
||
|
|
|
||
|
|
class AutoCloseOldTickets extends Command
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* The name and signature of the console command.
|
||
|
|
*
|
||
|
|
* @var string
|
||
|
|
*/
|
||
|
|
protected $signature = 'tickets:auto-close-old';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* The console command description.
|
||
|
|
*
|
||
|
|
* @var string
|
||
|
|
*/
|
||
|
|
protected $description = 'Run the AutoCloseOldTickets job.';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Execute the console command.
|
||
|
|
*
|
||
|
|
* @return integer
|
||
|
|
*/
|
||
|
|
public function handle()
|
||
|
|
{
|
||
|
|
$this->info('Running the Job, this could take some time.');
|
||
|
|
$job = new JobsAutoCloseOldTickets();
|
||
|
|
$job->handle();
|
||
|
|
$this->info('Job completed');
|
||
|
|
|
||
|
|
return 0;
|
||
|
|
}
|
||
|
|
}
|