Manage Your Laravel Schedule From A Web Dashboard

Overview

Laravel Totem

Build Status License

Introduction

Join the chat at https://gitter.im/laravel-totem/Lobby

Manage your Laravel Schedule from a pretty dashboard. Schedule your Laravel Console Commands to your liking. Enable/Disable scheduled tasks on the fly without going back to your code again.

Documentation

Compatiblity Matrix

Laravel Totem
8.x 8.x
7.x 7.x
6.x 6.x
5.8 5.x
5.7 4.x
5.6 3.x
5.5 2.x
5.4 1.x

Installing

Totem requires Laravel v5.4 and above, please refer to the above table for compatability. Use composer to install totem to your Laravel project

composer require studio/laravel-totem

Laravel Totem supports auto package discovery for Laravel v5.5+, therefore service provider registration is not required in Laravel v5.5+

Add TotemServiceProvider to the providers array of your Laravel v5.4 application's config/app.php

Studio\Totem\Providers\TotemServiceProvider::class,

Once Laravel Totem is installed & registered,

  • Run the migration
php artisan migrate
  • Publish Totem assets to your public folder using the following command
php artisan totem:assets
Table Prefix

Totems' tables use generic names which may conflict with existing tables in a project. To alleviate this the .env param TOTEM_TABLE_PREFIX can be set which will apply a prefix to all of Totems tables and their models.

Updating

Please republish totem assets after updating totem to a new version

php artisan totem:assets

Configuration

Cron Job

This package assumes that you have a good understanding of Laravel's Task Scheduling and Laravel Console Commands. Before any of this works please make sure you have a cron running as follows:

* * * * * php /path-to-your-project/artisan schedule:run >> /dev/null 2>&1
Web Dashboard

Laravel Totem's dashboard is inspired by Laravel Horizon. Just like Horizon you can configure authentication to Totem's dashboard. Add the following to the boot method of your AppServiceProvider or wherever you might seem fit.

use Studio\Totem\Totem;

Totem::auth(function($request) {
    // return true / false . For e.g.
    return Auth::check();
});

By default Totem's dashboard only works in local environment. To view the dashboard point your browser to /totem of your app. For e.g. laravel.dev/totem.

Filter Commands Dropdown

By default Totem outputs all Artisan commands on the Create/Edit tasks. To make this dropdown more concise there is a filter config feature that can be set in the totem.php config file.

Example filters

'artisan' => [
    'command_filter' => [
        'stats:*',
        'email:daily-reports'
    ],
],

This feature uses fnmatch syntax to filter displayed commands. stats:* will match all Artisan commands that start with stats: while email:daily-reports will only match the command named email:daily-reports.

This filter can be used as either a whitelist or a blacklist. By default it acts as a whitelist but an option flag can be set to instead act as a blacklist.

'artisan' => [
    'command_filter' => [
        'stats:*',
        'email:daily-reports'
    ],
    'whitelist' => true,
],

If the value of whitelist is false then the filter acts as a blacklist.

'whitelist' => false

Middleware

Laravel Totem uses the default web and api middleware but if customization is required the middleware can be changed by setting the appropriate .env value. These values can be found in config/totem.php.

Making Commands available in Laravel Totem

All artisan commands can be scheduled. If you want to hide a command from Totem make sure you have the hidden attribute set to true in your command. For e.g.

protected $hidden = true;

From L5.5 onwards all commands are auto registered, so this wouldn't be a problem.

Command Parameters

If your command requires arguments or options please use the optional command parameters field. You can provide parameters to your command as a string in the following manner

name=john.doe --greetings='Welcome to the new world'

In the example above, name is an argument while greetings is an option

Console Command

In addition to the dashboard, Totem provides an artisan command to view a list of scheduled task.

php artisan schedule:list

Screenshots

Task List

Task List

Task Details

Task List

Edit Task

Task List

Artisan Command to view scheduled tasks

Task List

Changelog

Important versions listed below. Refer to the Changelog for a full history of the project.

Credits

Bug reports, feature requests, and pull requests can be submitted by following our Contribution Guide.

Contributing & Protocols

License

This software is released under the MIT License.

© 2020 Roshan Gautam, All rights reserved.

Comments
  • Custom commands not showing

    Custom commands not showing

    Hi, loving the idea of this package so wanted to give it a go.

    We've got around 15 custom commands which are registered in the Console/Kernel.php and we run via the normal laravel scheduler.

    However none of these commands are showing on the Totem create task screen.

    Is there something we need to do to make these show?

    Thanks

    opened by OwenMelbz 23
  • Commands Not Running Even Though Listed

    Commands Not Running Even Though Listed

    Just switching from manually scheduling tasks into Totem. Everything is imported and php artisan schedule:list shows all commands correctly. However none of the commands run at their scheduled time, though manually executing through Totem does work.

    Trying to debug locally if I create command to simply log an output, it shows up in list:

    image

    • Enabling the command in Kernel.php logs to the log file correctly
    • Enabling the command in Totem does not log anything from the command
    • Enabling the command in both Kernel and Totem shows identical commands scheduled (see below)

    image

    Not sure if there is other configuration missing why this isn't working?

    Laravel Framework: 8.34.0 Laravel Totem: 8.1.1

    bug stale 
    opened by s1rc 17
  • Disable writing to log

    Disable writing to log

    According to the config and the code I can't seem to find a way to disable the Log::info calls being made, which is quickly filling up the laravel-logs which is undesirable for big projects. This is just after enabling totem for 30 minutes in our system:

    image

    opened by joaolisboa 14
  • [BUG] Schedule page and console list desync

    [BUG] Schedule page and console list desync

    In our environment, none of our tasks are getting executed anymore. On the page, we have tasks (just a sample of our tasks):

    image

    But notice that the only task that appears to be executing anymore is the Download TV Guide. Which was one of the first tasks added to the system. Most of our tasks look exactly the same: 8/31 was their last execution. Even though they have upcoming scheduled times. This includes tasks that are supposed to run every minute.

    However, the console command: image

    Lists nothing.

    This morning, I ran a composer update to see if it would fix the problem, and no issues with the update. But tasks still aren't running. I checked my crontab:

    * * * * * * php /var/www/html/scheduler/artisan schedule:run >> /var/www/html/scheduler/storage/logs/schedule_runs.log 2>&1

    Which writes to a log file so we can make sure everything is running. And the scheduled task runs.

    Any of the tasks on the page can be run manually by hitting the play button.

    stale 
    opened by chssmith 12
  • migration error on alter duration

    migration error on alter duration

    Hey,

    after installing and executing "php artisan migrate" i´am getting the following error:

    image

    The point is following migration, which don´t work on postgresql:

    image

    stale 
    opened by jagDanJu 10
  • [BUG] overriding multiples arguments;

    [BUG] overriding multiples arguments;

    Creating at new task: in the field "PARAMETERS (OPTIONAL)" I insert the following information for a custom command that can accept multiple arguments: "seaport=15 typetraffic=05" When i click Execute (to force execution) it works, because it don't use the console. However, when using the console (Laravel's schedule), it errors. I took the liberty to debug the code and found a problem in the file Task.php, method compileParameters. The problem happens because when running on console it doesn't pass named parameters, and in the mentioned method it will override the first parameter with the second as both will have the key 0. Following is a Print of a fix.

    Please inform me if there is another solution.

    opened by JeanCarloLeal 10
  • Improve

    Improve "Illuminate\Console\Scheduling\Schedule" configuration

    Right now in the \Studio\Totem\Providers\ConsoleServiceProvider::register method the booted event is being listened and then app is run in console, then new schedules are added into application.

    Proposing to simplify this by:

    1. using \Studio\Totem\Providers\ConsoleServiceProvider::boot method instead of \Studio\Totem\Providers\ConsoleServiceProvider::register method
    2. do the $this->app->resolving(Illuminate\Console\Scheduling\Schedule::class, function (...
    3. don't check for console

    This way whoever wants the schedule class would get it with all schedules already added.

    Not sure though how this thing could be tested or if resolving events are triggered in unit tests.

    opened by aik099 10
  • Totem task_frequencies queries present in every request

    Totem task_frequencies queries present in every request

    Every request made outside of Totem routes still has totem queries such as:

    select
      *
    from
      `totem_task_frequencies`
    where
      `totem_task_frequencies`.`task_id` = 1
      and `totem_task_frequencies`.`task_id` is not null
    

    and

    select
      *
    from
      `totem_frequency_parameters`
    where
      `totem_frequency_parameters`.`frequency_id` in (1)
    

    Is there a reason these queries and cache hits are running on all requests?

    opened by s1rc 9
  • route:call

    route:call

    Hey,

    I am trying to run it with the comand route:call and using this as parameter: /api/v1/test?api_key=1234567890

    The response is The "/api/v1/test?api_key" argument does not exist. Note that the api_key values is omitted on the error message.

    The same command: php artisan route:all /api/v1/test?api_key=1234567890 runs on the command line.

    What am I missing?

    Thanks,

    stale 
    opened by sergionader 9
  • php artisan schedule:list cannot read tasks from Totem

    php artisan schedule:list cannot read tasks from Totem

    1. I've created new project on fresh Laravel 5.8.*.
    2. I've added "studio/laravel-totem": "^5.0" to composer.json, nothing else.
    3. Then I've created new task to scheduler using Totem form: Zrzut ekranu 2019-08-27 o 10 48 49
    4. I've already had schedule:run in crontab: ** totem/artisan schedule:run >> /dev/null 2>&1 **
    5. Tasks not firing, because php artisan schedule:list returns only No Scheduled Commands Found

    I'm using latest MacOS, PHP 7.3.* and MySql 5.7.*. I've already tried to

    • clean cache,
    • optimize,
    • create new Laravel fresh project only for Totem tests,
    • change between different databases,
    • create own config/totem.php file with empty configuration.

    Nothing helped.

    Do I need any special configuration in .env or database.php/cache.php files?

    stale 
    opened by michalper 9
  • schedule task not running

    schedule task not running

    Hello i am working on laravel 5.6 and i am using totem "studio/laravel-totem": "v3.3.1". the issue is totem task is not firing. i have checked with every minute schedlue task and between but no luck. and all my kerrnal task is running

    please help me i need this is working urgently Screenshot from 2019-07-25 16-17-17

    stale 
    opened by ankit-aresourcepool 8
  • Version 9 Auth Isuse

    Version 9 Auth Isuse

    Somehow in version 9 totem is missing auth guard, it keeps redirecting to login and due to loged in user it keeps redirecting to /home. I did configure AppServiceProvider.

    opened by saaiful 1
  • Add an ability to run custom commands

    Add an ability to run custom commands

    Hi I checked your code and notice that you get list of artisan commands with Artisan::all() for display in web UI.

    But the Artisan:all() does not return all artisan commands because your code does not running in console.

    For example for laravel/telescope package see ServiceProvider.

    This provider first check if Laravel is running in console then register commands. But when we call Artisan:all() commands that not return the telescope or horizon commands.

    So if you can allow to define custom commands this package will more useful.

    opened by gholamrezaeipt 0
Releases(v9.0.0)
  • v9.0.0(Jun 29, 2022)

    What's Changed

    • Laravel 9 by @qschmick in https://github.com/codestudiohq/laravel-totem/pull/314
      • Assisted by @albanh and @InfluxOW

    Full Changelog: https://github.com/codestudiohq/laravel-totem/compare/v8.4.2...v9.0.0

    Source code(tar.gz)
    Source code(zip)
  • v8.4.2(Mar 22, 2022)

    What's Changed

    • Updated to use collection count by @qschmick in https://github.com/codestudiohq/laravel-totem/pull/324

    Full Changelog: https://github.com/codestudiohq/laravel-totem/compare/v8.4.1...v8.4.2

    Source code(tar.gz)
    Source code(zip)
  • v8.4.1(Mar 22, 2022)

    DO NOT USE, CONTAINS INFINITE LOOP BUG

    What's Changed

    • Updated to pluck ids and perform delete using the ids by @qschmick in https://github.com/codestudiohq/laravel-totem/pull/322

    Full Changelog: https://github.com/codestudiohq/laravel-totem/compare/v8.4.0...v8.4.1

    Source code(tar.gz)
    Source code(zip)
  • v8.4.0(Mar 15, 2022)

    What's Changed

    • TaskResults: Improve cleanup & fetching by @solflare in https://github.com/codestudiohq/laravel-totem/pull/320

    New Contributors

    • @solflare made their first contribution in https://github.com/codestudiohq/laravel-totem/pull/320

    Full Changelog: https://github.com/codestudiohq/laravel-totem/compare/v8.3.3...v8.4.0

    Source code(tar.gz)
    Source code(zip)
  • v8.3.3(Mar 7, 2022)

    What's Changed

    • Optimisation for AVG run time by @SwithFr in https://github.com/codestudiohq/laravel-totem/pull/317

    New Contributors

    • @SwithFr made their first contribution in https://github.com/codestudiohq/laravel-totem/pull/317

    Full Changelog: https://github.com/codestudiohq/laravel-totem/compare/v8.3.2...v8.3.3

    Source code(tar.gz)
    Source code(zip)
  • v8.3.2(Feb 24, 2022)

    What's Changed

    • Fix N+1 frequencies relation at tasks dashboard by @locnguyen1842 in https://github.com/codestudiohq/laravel-totem/pull/315

    New Contributors

    • @locnguyen1842 made their first contribution in https://github.com/codestudiohq/laravel-totem/pull/315

    Full Changelog: https://github.com/codestudiohq/laravel-totem/compare/v8.3.1...v8.3.2

    Source code(tar.gz)
    Source code(zip)
  • v8.3.1(Feb 1, 2022)

    What's Changed

    • Use default database connection from config by @cyruscollier in https://github.com/codestudiohq/laravel-totem/pull/312

    New Contributors

    • @cyruscollier made their first contribution in https://github.com/codestudiohq/laravel-totem/pull/312

    Full Changelog: https://github.com/codestudiohq/laravel-totem/compare/v8.3.0...v8.3.1

    Source code(tar.gz)
    Source code(zip)
  • v8.3.0(Sep 8, 2021)

    • Updates DBAL to 3.x
    • Adds Docker for local development
    • Caching frequencies to reduce DB calls thanks to @o-kima
    • Updated initialization check to still all app to run when table doesn't exist thanks to @o-kima
    Source code(tar.gz)
    Source code(zip)
  • v8.2.0(Aug 13, 2021)

  • v8.1.4(May 25, 2021)

    Enhancement on handling parameters that include the = in them thanks to @o-kima. Examples can be viewed on the PR: https://github.com/codestudiohq/laravel-totem/pull/281

    Source code(tar.gz)
    Source code(zip)
  • v8.1.3(May 25, 2021)

    • Fix for missing default prefix value in config courtesy of @CrazyBoy49z
    • Fix for cleanup toggles so the correct selection shows after save courtesy of @bondas83
    Source code(tar.gz)
    Source code(zip)
  • v8.1.2(May 25, 2021)

    Laravel 8.x treats the order of registration differently. This change properly registers the Console Service Provider so schedule tasks will run correctly and the schedule:list command will work

    Source code(tar.gz)
    Source code(zip)
  • v8.1.1(Feb 10, 2021)

  • v8.0.5(Feb 6, 2021)

    Big thanks to @daniel-g-wood

    • Fixes issues #271: inconsistencies between using Storage::path and storage_path.
    • Adds a "log_folder" key to the config (totem.php) to specify where the output from command results are stored
    • Export to json no longer uses a temporary file, but instead uses streamDownload
    • Adds additional tests for execution of the task via the scheduler, and also via the execute task endpoint
    • Adds additional tests for exporting and importing tasks
    • Upgrades phpunit.xml to the new format
    • Adds 'ext-json' as an explicit dependency in composer.json
    Source code(tar.gz)
    Source code(zip)
  • v8.0.4(Jan 21, 2021)

  • v8.0.3(Jan 20, 2021)

  • v8.0.2(Dec 10, 2020)

  • v8.0.1(Nov 16, 2020)

  • v7.0.3(Nov 16, 2020)

  • v8.0(Oct 30, 2020)

  • v7.0.2(Oct 27, 2020)

  • v7.0.1(Jun 9, 2020)

  • v6.0.3(Jun 9, 2020)

  • v7.0.0(Apr 18, 2020)

  • v5.3.1(Jan 19, 2020)

  • v6.0.2(Jan 6, 2020)

  • v6.0.1(Oct 26, 2019)

  • v6.0.0(Oct 26, 2019)

  • v5.3.0(Oct 25, 2019)

  • v5.2.0(Sep 27, 2019)

    • Fixes issue with sort/filters lost when paging on task list
    • Updated column type for duration to decimal to fix issues with MSSQL and Postgres for aggregate operations
    Source code(tar.gz)
    Source code(zip)
Owner
ⓒⓞⓓⓔ ⓢⓣⓤⓓⓘⓞ
ⓒⓞⓓⓔ ⓢⓣⓤⓓⓘⓞ
Dispatcher is a Laravel artisan command scheduling tool used to schedule artisan commands within your project so you don't need to touch your crontab when deploying.

Dispatcher Dispatcher allows you to schedule your artisan commands within your Laravel project, eliminating the need to touch the crontab when deployi

Indatus 1.1k Jan 5, 2023
A course database lookup tool and schedule building web application for use at Rochester Institute of Technology.

CSH ScheduleMaker A course database lookup tool and schedule building web application for use at Rochester Institute of Technology. Built, maintained

Computer Science House 55 Nov 8, 2022
Schedule and unschedule eloquent models elegantly without cron jobs

Laravel Schedulable Schedule and Unschedule any eloquent model elegantly without cron job. Salient Features: Turn any Eloquent Model into a schedulabl

Neelkanth Kaushik 103 Dec 7, 2022
Crunz is a framework-agnostic package to schedule periodic tasks (cron jobs) in PHP using a fluent API.

Crunz Install a cron job once and for all, manage the rest from the code. Crunz is a framework-agnostic package to schedule periodic tasks (cron jobs)

Reza Lavarian 1.4k Dec 26, 2022
Manage your Laravel Task Scheduling in a friendly interface and save schedules to the database.

Documentation This librarian creates a route(default: /schedule) in your application where it is possible to manage which schedules will be executed a

Roberson Faria 256 Dec 21, 2022
Manage all your cron jobs without modifying crontab. Handles locking, logging, error emails, and more.

Jobby, a PHP cron job manager Install the master jobby cron job, and it will manage all your offline tasks. Add jobs without modifying crontab. Jobby

null 1k Dec 25, 2022
Easily implement optimistic Eloquent model locking feature to your Laravel app.

quarks/laravel-locking Easily implement optimistic Eloquent model locking feature to your Laravel app. Installation composer require quarks/laravel-lo

Quarks 2 Jun 21, 2022
Laravel-Tasks is a Complete Build of Laravel 5.2 with Individual User Task Lists

An app of tasks lists for each individual user. Built on Laravel 5.2, using 5.2 authentication and middleware. This has robust verbose examples using Laravel best practices.

Jeremy Kenedy 26 Aug 27, 2022
Laravel Cron Scheduling - The ability to run the Laravel task scheduler using different crons

Laravel Cron Scheduling Laravel Task Scheduling is a great way to manage the cron. But the documentation contains the following warning: By default, m

Sergey Zhidkov 4 Sep 9, 2022
Task Scheduling with Cron Job in Laravel

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Shariful Islam 1 Oct 16, 2021
A better way to create complex batch job queues in Laravel.

Relay A better way to create complex batch job queues in Laravel. Installation composer require agatanga/relay Usage Example Let's say you have the fo

Agatanga 10 Dec 22, 2022
Manage Your Laravel Schedule From A Web Dashboard

Introduction Manage your Laravel Schedule from a pretty dashboard. Schedule your Laravel Console Commands to your liking. Enable/Disable scheduled tas

ⓒⓞⓓⓔ ⓢⓣⓤⓓⓘⓞ 1.6k Jan 1, 2023
Laracon Schedule a command-line tool that gives you the Laracon Online schedule in your timezone.

Laracon Schedule a command-line tool that gives you the Laracon Online schedule in your timezone. ?? Quick start Requires PHP 7.4+ # First, install: c

Nuno Maduro 101 Sep 16, 2022
ControlPanel's Dashboard is a dashboard application designed to offer clients a management tool to manage their pterodactyl servers.

Features PayPal Integration Email Verification Audit Log Admin Dashboard User/Server Management Store (credit system) Vouchers and so much more! Contr

ControlPanel.gg 223 Jan 5, 2023
Simple Arabic Laravel Dashboard , has basic settings and a nice layout . to make it easy for you to create fast dashboard

Simple Arabic Laravel Dashboard ✅ Auto Seo ✅ Optimized Notifications With Images ✅ Smart Alerts ✅ Auto Js Validations ✅ Front End Alert ✅ Nice Image V

Peter Tharwat 254 Dec 19, 2022
Dispatcher is a Laravel artisan command scheduling tool used to schedule artisan commands within your project so you don't need to touch your crontab when deploying.

Dispatcher Dispatcher allows you to schedule your artisan commands within your Laravel project, eliminating the need to touch the crontab when deployi

Indatus 1.1k Jan 5, 2023
Dispatcher is a Laravel artisan command scheduling tool used to schedule artisan commands within your project so you don't need to touch your crontab when deploying.

Dispatcher Dispatcher allows you to schedule your artisan commands within your Laravel project, eliminating the need to touch the crontab when deployi

Indatus 1.1k Dec 21, 2022
1Pilot.io, a universal dashboard to effortlessly manage all your Laravel applications

Website · Free Trial · Pricing · Documentation · API · Feedback · Support [You] What are you, strange being? [1Pilot] Greetings, traveller. I am 1Pilo

1Pilot 10 Nov 21, 2022
A course database lookup tool and schedule building web application for use at Rochester Institute of Technology.

CSH ScheduleMaker A course database lookup tool and schedule building web application for use at Rochester Institute of Technology. Built, maintained

Computer Science House 55 Nov 8, 2022
👨🏻‍🚀 A command-line tool that gives you the Alpine Day 2021 schedule in your timezone. 🚀

Alpine Day Schedule a command-line tool that gives you the Alpine Day 2021 schedule in your timezone. ?? Quick start Requires PHP 7.4+ # First, instal

Nuno Maduro 11 Jun 10, 2021