Registering Tasks


Registering Commands

To register your commands with Kernel Connect you simply need to add them to your config/kernel-connect.php commands array:

/*
* Register individual commands you want to make available to Kernel Connect.
*/
'commands' => [
    \App\Console\Commands\MakePizza::class,
    \App\Console\Commands\GetCoffee::class,
    // e.g App\Console\Commands\MyCommand::class
],

You can also tell Kernel Connect to automatically register all commands within your App\Console\Commands directory. Simply edit your config/kernel-connect.php and set show_all_commands to true:

/*
* Setting this to true will scan your App\Commands directory and make available all commands found
*/
'show_all_commands' => env('KERNEL_CONNECT_SHOW_ALL_COMMANDS', false),

You can also configure this setting via your .env file, simple add the following:

KERNEL_CONNECT_SHOW_ALL_COMMANDS=true

Registering Jobs

To register your jobs with Kernel Connect you simply need to add them to your config/kernel-connect.php jobs array:

/*
* Register individual jobs you want to make available to Kernel Connect
*/
'jobs' => [
    // e.g App\Jobs\MyJob::class
],

You can also tell Kernel Connect to automatically register all jobs within your App\Jobs directory. Simply edit your config/kernel-connect.php and set show_all_jobs to true:

/*
* Setting this to true will scan your App\Jobs directory and make available all jobs found
*/
'show_all_jobs' => env('KERNEL_CONNECT_SHOW_ALL_JOBS', false),

You can also configure this setting via your .env file, simple add the following:

KERNEL_CONNECT_SHOW_ALL_JOBS=true