I am working on projects where the CronJob works are being handelled by a console commands. Those commands are developed manually to serve different jobs on the DB.
But now the issue is When we run
php artisan cache:clear
it checks all commands created under console folder first and then its running the cache:clear command. So obviously the command is running super slow. because its going through 15 commands that has been created manually.
So Is there a way we can ignore those manual command while running migration , cache , config , view commands. And those commands only being active when we call it manually ?
I have checked using making it hidden using following method but it didnt work
Hiding Using the Command hidden property
class updateAPILogSync extends Command
{
protected $signature = 'apilog:update';
protected $description = 'Serve function to sync the log to migrant DB';
protected $hidden = true;
}
Hiding Using the setHidden method
class updateAPILogSync extends Command
{
protected $signature = 'apilog:update';
protected $description = 'Serve function to sync the log to migrant DB';
public function __construct()
{
parent::__construct();
$this->setHidden(true);
}
}
Can please guide me on this. how i can ignore this manual commands and speed up the pre-defined commands