All Projects → MatviiB → scheduler

MatviiB / scheduler

Licence: other
Task Scheduler for Laravel applications. UI from scratch

Programming Languages

HTML
75241 projects
PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to scheduler

Cronscheduler.aspnetcore
Cron Scheduler for AspNetCore 2.x/3.x or DotNetCore 2.x/3.x Self-hosted
Stars: ✭ 100 (+455.56%)
Mutual labels:  cron, scheduler, task-scheduler
nodejs-cron-job-must-know
it is an example of running node.js script with every certain period(cron job)
Stars: ✭ 35 (+94.44%)
Mutual labels:  cron, schedule, scheduler
Openmangosteen
Devops定时调用http接口,定时执行SSH命令的WEB定时任务工具。
Stars: ✭ 41 (+127.78%)
Mutual labels:  scheduler, task-manager, task-scheduler
Gocron
Easy and fluent Go cron scheduling. This is a fork from https://github.com/jasonlvhit/gocron
Stars: ✭ 605 (+3261.11%)
Mutual labels:  cron, schedule, scheduler
gronx
Lightweight, fast and dependency-free Cron expression parser (due checker), task scheduler and/or daemon for Golang (tested on v1.13 and above) and standalone usage
Stars: ✭ 206 (+1044.44%)
Mutual labels:  scheduler, task-manager, task-scheduler
Crono
A time-based background job scheduler daemon (just like Cron) for Rails
Stars: ✭ 637 (+3438.89%)
Mutual labels:  cron, schedule, scheduler
linda
Linda is a simple dispatcher library.
Stars: ✭ 12 (-33.33%)
Mutual labels:  cron, schedule, scheduler
Sleepto
An alternative to traditional task schedulers
Stars: ✭ 98 (+444.44%)
Mutual labels:  cron, schedule, task-scheduler
croner
Trigger functions and/or evaluate cron expressions in JavaScript. No dependencies. Most features. All environments.
Stars: ✭ 169 (+838.89%)
Mutual labels:  cron, schedule, scheduler
gymbox-bot
Simplify the booking of a gymbox class.
Stars: ✭ 21 (+16.67%)
Mutual labels:  cron, schedule
TaskManager
A C++14 Task Manager / Scheduler
Stars: ✭ 81 (+350%)
Mutual labels:  task-manager, task-scheduler
sidecloq
Recurring / Periodic / Scheduled / Cron job extension for Sidekiq
Stars: ✭ 81 (+350%)
Mutual labels:  cron, schedule
rhythm
Time-based job scheduler for Apache Mesos
Stars: ✭ 30 (+66.67%)
Mutual labels:  cron, scheduler
watchman
📆 更夫(watchman)是一款可视化的定时任务配置 Web 工具,麻麻不用担心我漏掉任何更新啦!
Stars: ✭ 40 (+122.22%)
Mutual labels:  cron, schedule
King.Service
Task scheduling for .NET
Stars: ✭ 34 (+88.89%)
Mutual labels:  scheduler, task-scheduler
angular-gantt-schedule-timeline-calendar-example
Angular gantt-schedule-timeline-calendar usage example
Stars: ✭ 15 (-16.67%)
Mutual labels:  schedule, scheduler
ld-scheduler
Schedule Launch Darkly flags on or off
Stars: ✭ 14 (-22.22%)
Mutual labels:  schedule, scheduler
coo
Schedule Twitter updates with easy
Stars: ✭ 44 (+144.44%)
Mutual labels:  schedule, scheduler
Automation-using-Shell-Scripts
Development Automation using Shell Scripting.
Stars: ✭ 41 (+127.78%)
Mutual labels:  cron, scheduler
krolib
Magic library and DSL to handle complex schedules
Stars: ✭ 19 (+5.56%)
Mutual labels:  schedule, scheduler

build passed StyleCI Total Downloads License

Installation

First steps

Add Provider for Laravel < 5.5

MatviiB\Scheduler\SchedulerServiceProvider::class,

Publish config and CronTasksList class files:

php artisan vendor:publish

and choose "Provider: MatviiB\Scheduler\SchedulerServiceProvider" if requested.

Files that must be published:

config/scheduler.php
app/Console/CronTasksList.php

Create database table:

 php artisan migrate

Let's finish setup

Move your commands from App\Console\Kernel schedule() function to new file: CronTasksList.php trait.

Add next line to schedule() function instead of list of commands:

<?php
 
namespace App\Console;
 
use MatviiB\Scheduler\Console\Kernel as SchedulerKernel;
 
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
 
class Kernel extends ConsoleKernel
{
    /**
     * The Artisan commands provided by your application.
     *
     * @var array
     */
    protected $commands = [
        ..
        ..
    ];
 
    /**
     * Define the application's command schedule.
     *
     * @param \Illuminate\Console\Scheduling\Schedule  $schedule
     * @return void
     */
    protected function schedule(Schedule $schedule)
    {
        // make changes just here
        // cut your commands from here
        // and write next line
        with(new SchedulerKernel())->schedule($schedule);
    }

Paste your commands to app/Console/CronTasksList.php trait:

<?php

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;

/**
 * Trait CronTasksList
 *
 * To use: uncomment all lines and copy your commands list
 * from app/Console/Kernel.php schedule() to tasks() function.
 *
 * @package App\Console
 */
trait CronTasksList
{
    public function tasks(Schedule $schedule)
    {
        // paste your commands here
        $schedule->command('example:command')->yearly()->withoutOverlapping();
    }
}

If everything done for now you can run next command, it will show your current commands list

php artisan scheduler:show

And you will see something like this

Scheduler is disabled.
You see standard tasks list.
+-----------------+------------------------------+-----------+-------------+-----+----------+
| command         | description                  | is_active | expression  | w_o | interval |
+-----------------+------------------------------+-----------+-------------+-----+----------+
| command:name    | Description for command:name | 1         | 0 * * * * * | 1   | 1 hour   |
| example:command | Command description          | 1         | * * * * * * | 1   | 1 minute |
+-----------------+------------------------------+-----------+-------------+-----+----------+

To use Scheduler you need to copy commands to schedulers table.

Note: every scheduler:create execution will soft delete old tasks and create fresh commands data.

php artisan scheduler:create

To use Scheduler you need enable it by adding to your .env next line:

SCHEDULER_ENABLED=true

Let's check status and scheduled tasks:

php artisan scheduler:show

And you will see something like this:

Scheduler is enabled.
You see scheduled tasks list configured with Scheduler.
+-----------------+------------------------------+-----------+-------------+-----+----------+
| command         | description                  | is_active | expression  | w_o | interval |
+-----------------+------------------------------+-----------+-------------+-----+----------+
| command:name    | Description for command:name | 1         | 0 * * * * * | 1   | 1 hour   |
| example:command | Command description          | 1         | * * * * * * | 1   | 1 minute |
+-----------------+------------------------------+-----------+-------------+-----+----------+

Usage

You can manage your scheduled task on page /scheduler by default.

Also you are free to configure it yourself in config/scheduler.php.

After creating operation you will have your scheduled tasks list and it will ready to work but with scheduler you have some more powerfull things.

  1. You can create different tasks for same command with different parameters and run it separately.

On the next screenshot you can see the same scheduled task for generate report with argument user equal 1 and option --client=2 for first task and argument user equal 3 and option --client=4 for next one. laravel scheduler

This is how the creating task page looks like: laravel scheduler

  1. Next powerfull thing - You can run your tasks from UI imediately with different arguments and options.

Next screenshot shows how it works: laravel scheduler

License

Scheduler for Laravel is open-sourced software licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].