All Projects → robersonfaria → Laravel Database Schedule

robersonfaria / Laravel Database Schedule

Licence: gpl-3.0
Manage your Laravel Task Scheduling in a friendly interface and save schedules to the database.

Projects that are alternatives of or similar to Laravel Database Schedule

Laravel Analytics
Analytics for the Laravel framework.
Stars: ✭ 91 (-3.19%)
Mutual labels:  laravel, dashboard
Laravel Dashboard Chart Tile
Create all the charts you want for your laravel dashboard
Stars: ✭ 102 (+8.51%)
Mutual labels:  laravel, dashboard
Forsun Laravel
高性能的定时调度服务。
Stars: ✭ 91 (-3.19%)
Mutual labels:  schedule, laravel
Tall Dashboard
Tailwind CSS + AlpineJS + Laravel + Livewire dashboard (WIP)
Stars: ✭ 83 (-11.7%)
Mutual labels:  laravel, dashboard
Next
Directus is a real-time API and App dashboard for managing SQL database content. 🐰
Stars: ✭ 111 (+18.09%)
Mutual labels:  database, dashboard
Laravel Sync Migration
Developer tool helps to sync migrations without refreshing the database
Stars: ✭ 89 (-5.32%)
Mutual labels:  database, laravel
Lara Lens
Laravel package for display diagnostic (config, database, http connections...)
Stars: ✭ 96 (+2.13%)
Mutual labels:  database, laravel
Laravel Optimistic Locking
Adds optimistic locking feature to eloquent models.
Stars: ✭ 71 (-24.47%)
Mutual labels:  database, laravel
Laqul
A complete starter kit that allows you create amazing apps that look native thanks to the Quasar Framework. Powered by an API developed in Laravel Framework using the easy GraphQL queries language. And ready to use the Google Firebase features.
Stars: ✭ 110 (+17.02%)
Mutual labels:  laravel, dashboard
Laravel Settings
Store key value pair in database as settings
Stars: ✭ 107 (+13.83%)
Mutual labels:  database, laravel
Db Seeder
A database seeder app for MySQL
Stars: ✭ 77 (-18.09%)
Mutual labels:  database, laravel
Backup Manager
Database backup manager for dumping to and restoring databases from S3, Dropbox, FTP, SFTP, and Rackspace Cloud
Stars: ✭ 1,589 (+1590.43%)
Mutual labels:  database, laravel
Laravel Log To Db
Custom Laravel and Lumen 5.6+ Log channel handler that can store log events to SQL or MongoDB databases. Uses Laravel/Monolog native logging functionality.
Stars: ✭ 76 (-19.15%)
Mutual labels:  database, laravel
Laravel Totem
Manage Your Laravel Schedule From A Web Dashboard
Stars: ✭ 1,299 (+1281.91%)
Mutual labels:  laravel, dashboard
Laravel Db Normalizer
Normalize all database results to one unified interface, to make swapping repositories a breeze.
Stars: ✭ 72 (-23.4%)
Mutual labels:  database, laravel
React Antd Admin
用React和Ant Design搭建的一个通用管理后台
Stars: ✭ 1,313 (+1296.81%)
Mutual labels:  database, dashboard
Backup
MySQL Database backup package for Laravel
Stars: ✭ 66 (-29.79%)
Mutual labels:  database, laravel
Vmdash
A Cloud (vm) Dashboard that allows you to interact with multiple providers from a single panel
Stars: ✭ 71 (-24.47%)
Mutual labels:  laravel, dashboard
Ardent
Self-validating, secure and smart models for Laravel's Eloquent ORM
Stars: ✭ 1,412 (+1402.13%)
Mutual labels:  database, laravel
Databazel
The analytical and reporting solution for MongoDB
Stars: ✭ 118 (+25.53%)
Mutual labels:  database, dashboard

Laravel Database Schedule

Documentation

This librarian creates a route(default: /schedule) in your application where it is possible to manage which schedules will be executed at any given moment, these schedules are recorded in the database and can be changed, activated, inactivated or deleted via the interface without the need for a new application deployment.

List Schedules

Create Schedules

Show History Schedules

Installation

  1. Run composer require robersonfaria/laravel-database-schedule
  2. Run php artisan migrate

Environment variables

You can set the following environment variables to configure schedules:

  • SCHEDULE_TIMEZONE : The default is the same configured for the application, but if you need the schedules to run in a different timezone, it is possible to configure it with this variable
  • SCHEDULE_CACHE_DRIVER : The default is file
  • SCHEDULE_CACHE_ENABLE : The default is disabled when APP_DEBUG=true and enabled when APP_DEBUG=false

Configurations

There are several library configuration options, to change the settings you can get the configuration file for your project

php artisan vendor:publish --provider="RobersonFaria\DatabaseSchedule\DatabaseSchedulingServiceProvider" --tag="config"

Dashboard Authorization

Dashboard Authorization exposes a dashboard at /schedule URI. This route is protected by the viewDatabaseSchedule gate controls access. You are free to modify this gate as needed to restrict access to your Database Schedule Dashboard

protected function gate()
{
    Gate::define('viewDatabaseSchedule', function ($user) {
        return in_array($user->email, [
            '[email protected]',
        ]);
    });
}

Scheduled Task Example

Create the command for your scheduled task app/Console/Commands/test.php:

<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;

class test extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'command:test {user} {initialDate} {finalDate}';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Command description';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle()
    {
        $this->info('Hello ' . $this->argument('user'));
        $this->info("Initial Date: " . $this->argument('initialDate'));
        $this->info("Final Date: " . $this->argument('finalDate'));
        return 0;
    }
}

Access the dashboard and the command will be listed for scheduling, create a schedule like the example below: Create Schedule

Run the artisan command to run scheduled tasks

php artisan schedule:run

The console output will look like this

Running scheduled command: '/usr/bin/php7.2' 'artisan' command:test '1' '2021-02-10 00:00:00' '2021-04-10 00:00:00' > 'path/to/storage/logs/schedule-dcccb62f29f754dc83a86a3d0b59afb00a08fdb3.log' 2>&1

If you marked the sending of the output by email you will receive an email similar to this one:

Mail Output

Known issues:

  • Does not record run history when runInBackground is used

Credits

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].