You achieve the following though the available configuration options:
You can enable or disable the plugin by tweaking the enabled
flag or by setting the CRONBOARD_ENABLED
environment variable.
Cronboard inspects your codebase for commands and tasks it can use (see Usage). By default it will look in your app_path
folder, but you can tweak this behaviour.
You can include additional paths to look into and specify paths or specific classes that to be ignored.
Here's an example discovery configuration:
return [
// ...
'discovery' => [
'paths' => [
app_path(),
base_path('Domain')
],
'ignore' => [
app_path('Actions/Private'),
Domain\HiddenJob::class
],
// ...
],
// ...
];
There are some additional options dealing with third party commands - loaded from your project's package dependacies. By default Cronboard will record all third party commands that have been scheduled by your console kernel.
You can optionally enabled the recording of any and all other commands provided by other packages, including Laravel's own built in commands:
return [
// ...
'discovery' => [
// ...
'commands' => [
'include_third_party' => false,
'exclude_namespaces' => [
'Illuminate\',
],
'restrict_to_namespaces' => [
'PackageNamespace\Commands\'
]
]
],
];
By default any errors that occur within the Cronboard package are silenced i.e. the exceptions are caught. This is done to prevent them from interfering with your scheduled tasks and make sure these run even in the case of network or other issues. Silenced exceptions are passed on to your application's ExceptionHandler
binding.
From the configuration you can adjust this behavior by using the errors.silent
and errors.report
flags.
{success} Cronboard will handle any exceptions (external to your codebase) in order to make sure your scheduled tasks run, even when there are connectivity issues with the dashboard.
Key | Type | Default | Description |
---|---|---|---|
enabled |
boolean | true |
Enable or disable Cronboard |
discovery.paths |
array | app_path |
A list of paths to look through during the discovery process |
discovery.ignore |
array | A list of paths or class names to ignore during the discovery process | |
discovery.include_third_party |
boolean | false |
Toggle the discovery of commands in third party packages |
discovery.exclude_namespaces |
array | Illuminate\\ |
A list of namespace prefixes that will be excluded when loading third party commands |
discovery.restrict_to_namespaces |
array | A list of namespace prefixes to restrict the loading of third party commands | |
client.token |
string | CRONBOARD_TOKEN |
Cronboard API token for your project |
errors.silent |
boolean | true |
Silence and catch any exceptions caused by network or API connectivity issues |
errors.report |
boolean | true |
Report any exceptions caused by network or API connectivity issues |
After you're done with adjustments to your configuration you can preview what information will be sent to Cronboard:
php artisan cronboard:preview
This allows you to double check that you are not passing any information that you want to keep private.
Once your project has been set up and you are happy with your configuration - you can record your schedule. You can do that by running:
php artisan cronboard:record
This will inspect your application and record information based on your discovery configuration.
{primary} Add
php artisan cronboard:record
to your deployment pipeline.
If you're using an automated deployment process we recommend you add the cronboard:record
command to your deployment pipeline.
This will make sure that any changes to your schedule are reported back to Cronboard as soon as they reach your production servers.