A Laravel package that seamlessly integrates your application with Knocker for Laravel Cloud - a reliable service that ensures your scheduled tasks continue running even when your Laravel application is in hibernation mode.
Learn more about Knocker for Laravel Cloud at https://knocker.laravel.cloud.
- PHP 8.3 or higher
- Laravel 12.0 or higher
Install the package using Composer:
composer require kapersoft/knocker-for-laravel
If you like, you can publish the configuration file:
php artisan vendor:publish --tag="knocker-for-laravel-config"
This will create a configuration file with the following structure:
return [
'endpoint' => env('KNOCKER_ENDPOINT', 'https://knocker.laravel.cloud/api/v1/schedulerTasks'),
'token' => env('KNOCKER_TOKEN', ''),
];
After registering your application on Knocker for Laravel Cloud, add your authentication token to the .env
file:
KNOCKER_TOKEN=your-knocker-token-here
To register your application's scheduled tasks with Knocker for Laravel Cloud, run the following command:
php artisan knocker:send-scheduler-tasks
This command performs the following actions:
- Scans your scheduled tasks. These are usually in
routes/console.php
orapp/Console/Kernel.php
- Extracts task configurations including:
- Cron expressions and timing
- Command names and descriptions
- Timezone settings
- Callback functions and closures
- Uploads the task information to Knocker for Laravel Cloud
For seamless integration, add the registration command to your deployment pipeline:
php artisan knocker:send-scheduler-tasks
This ensures your task configurations are automatically updated with each deployment, keeping Knocker for Laravel Cloud synchronized with your latest scheduled tasks.
Run the test suite:
composer test
Please see the following files for additional information:
- CHANGELOG - Recent changes and version history
- CONTRIBUTING - Contribution guidelines
- LICENSE - MIT License details
Please review our security policy for information on reporting security vulnerabilities.
- Jan Willem Kaper - Package Author
- All Contributors - Community Contributors
This package is open-sourced software licensed under the MIT License.