PHP code example of dedermus / scheduling
1. Go to this page and download the library: Download dedermus/scheduling library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dedermus / scheduling example snippets
/**
* Register scheduled commands from routes/console.php.
*
* @return void
*/
protected function registerScheduledCommands()
{
app()->make('Illuminate\Contracts\Console\Kernel');
$events = app()->make('Illuminate\Console\Scheduling\Schedule');
// Load the routes/console.php file
$consoleRoutes = base_path('/routes/console.php');
if (File::exists($consoleRoutes)) {
App\Providers\ScheduleCommandProvider::class,
Schedule::command('inspire')->everyTenMinutes()->runInBackground();
Schedule::command('route:list')->dailyAt('02:00');