2017 © Pedro Peláez
 

library laravel-scheduling-tasks

Organize your Laravel scheduling tasks.

image

signifly/laravel-scheduling-tasks

Organize your Laravel scheduling tasks.

  • Monday, May 7, 2018
  • by signifly
  • Repository
  • 3 Watchers
  • 10 Stars
  • 540 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 262 % Grown

The README.md

Organize your Laravel scheduling tasks

Latest Version on Packagist Tests StyleCI Quality Score Total Downloads, (*1)

The signifly/laravel-scheduling-tasks package allows you to easily organize your scheduling tasks and comes with a handy make:task command., (*2)

Below is a small example of how to use it., (*3)

// Inside the app/Console/Kernel.php file add this
use Signifly\SchedulingTasks\Facades\TaskLoader;

protected function schedule(Schedule $schedule)
{
    TaskLoader::loadFor($schedule);
}

In order to make a new task, use the command that comes with the package:, (*4)

$ php artisan make:task BackupDaily

It generates a new task located at app/Console/Tasks/BackupDaily.php, which can be configured this way:, (*5)

<?php

namespace App\Console\Tasks;

use Signifly\SchedulingTasks\TaskContract;
use Illuminate\Console\Scheduling\Schedule;

class BackupDaily implements TaskContract
{
    public function __invoke(Schedule $schedule)
    {
        $schedule->command('backup:run')
            ->daily()
            ->at('01:00');
    }
}

In case you have a task that you want to exclude from getting loaded, it can be achieved like this:, (*6)

protected function schedule(Schedule $schedule)
{
    TaskLoader::loadFor($schedule, [
        \App\Console\Tasks\BackupDaily::class,
    ]);

    // \App\Console\Tasks\BackupDaily::class will not get loaded.
}

Installation

You can install the package via composer:, (*7)

$ composer require signifly/laravel-scheduling-tasks

The package will automatically register itself., (*8)

Testing

$ composer test

Security

If you discover any security issues, please email dev@signifly.com instead of using the issue tracker., (*9)

Credits

License

The MIT License (MIT). Please see License File for more information., (*10)

The Versions

07/05 2018

dev-master

9999999-dev https://github.com/signifly/laravel-scheduling-tasks

Organize your Laravel scheduling tasks.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Morten Poul Jensen

04/05 2018

v0.0.3

0.0.3.0 https://github.com/signifly/laravel-scheduling-tasks

Organize your Laravel scheduling tasks.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Morten Poul Jensen

04/05 2018

v0.0.2

0.0.2.0 https://github.com/signifly/laravel-scheduling-tasks

Organize your Laravel scheduling tasks.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Morten Poul Jensen

04/05 2018

v0.0.1

0.0.1.0 https://github.com/signifly/laravel-scheduling-tasks

Organize your Laravel scheduling tasks.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Morten Poul Jensen