GithubHelp home page GithubHelp logo

robersonfaria / laravel-database-schedule Goto Github PK

View Code? Open in Web Editor NEW
316.0 316.0 48.0 997 KB

Manage your Laravel Task Scheduling in a friendly interface and save schedules to the database.

License: GNU General Public License v3.0

PHP 65.60% Blade 34.40%
dashboard database laravel laravel-database-schedule php schedule scheduled-tasks

laravel-database-schedule's People

Contributors

andreypopov avatar hasanatcc avatar laravel-shift avatar pedropms avatar robersonfaria avatar skarjoss avatar thyseus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

laravel-database-schedule's Issues

Update Readme to help out new folk

Hey,

It would be great if you could add an example of how to modify the gate in the Dashboard Authorization section

It's a crucial part of the install and not all users will be familiar with extending vendor Service Providers ๐Ÿ‘

Problem in request to create a schedule

Hello,

I have a command that have two arguments, I want to create a schedule passing just the first, but the request is sending all, like the image shows.
Because of this, when cron runs, the method in Schedule model mapArguments break. I can resolve this is backend but I think is also a problem in the frontend that send invalid data.

I could resolve this too, but I'm terrible at frontend ๐Ÿ˜….

image

Add a button to run the scheduled job "now"

Could there be a possibility to add "run now" button on every job, so one does not need to wait for the crontab to proc and instead run some, especially maintenance tasks on demand?

Thanks

Translation not working

Hello.

I'm trying translate the UI to portuguese creating a file like schedule.php in my resources/lang/pt_BR folder, and this is not working. If I go to your package folder in vendor and add a pt_BR folder with my translations, it works.

Anyway, I forked the project to add the pt_BR folder directly to your project and already do the translations. I'm sending the PR, this can help those who have projects in pt_BR

Laravel 11 support

[UPDATED]

Version

### PHP VERSION:
8.3.4

### PHP EXTENSIONS:
Core, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, mysqlnd, PDO, xml, bcmath, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, igbinary, imagick, imap, intl, ldap, exif, msgpack, mysqli, pcov, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, readline, redis, shmop, SimpleXML, soap, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, memcached, swoole, Zend OPcache, xdebug

### LARAVEL VERSION:
11.2.0.0

Reproduce the error

  1. Create a new Laravel project
  2. composer require robersonfaria/laravel-database-schedule
./composer.json has been updated
Running composer update robersonfaria/laravel-database-schedule
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
  - Locking robersonfaria/laravel-database-schedule (1.4.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Downloading robersonfaria/laravel-database-schedule (1.4.0)
  - Installing robersonfaria/laravel-database-schedule (1.4.0): Extracting archive
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   Illuminate\Database\QueryException 

  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'agilts_backend.schedules' doesn't exist (Connection: mysql, SQL: select * from `schedules` where `status` = 1 and `schedules`.`deleted_at` is null)

  at vendor/laravel/framework/src/Illuminate/Database/Connection.php:813
    809โ–•                     $this->getName(), $query, $this->prepareBindings($bindings), $e
    810โ–•                 );
    811โ–•             }
    812โ–• 
  โžœ 813โ–•             throw new QueryException(
    814โ–•                 $this->getName(), $query, $this->prepareBindings($bindings), $e
    815โ–•             );
    816โ–•         }
    817โ–•     }

  i   A table was not found: You might have forgotten to run your database migrations. 
      https://laravel.com/docs/master/migrations#running-migrations

  1   [internal]:0
      RobersonFaria\DatabaseSchedule\Console\Scheduling\Schedule::__construct()
      +13 vendor frames 

  15  [internal]:0
      RobersonFaria\DatabaseSchedule\Console\Scheduling\Schedule::__construct()

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
  1. php artisan migrate
   Illuminate\Database\QueryException 

  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'agilts_backend.schedules' doesn't exist (Connection: mysql, SQL: select * from `schedules` where `status` = 1 and `schedules`.`deleted_at` is null)

  at vendor/laravel/framework/src/Illuminate/Database/Connection.php:813
    809โ–•                     $this->getName(), $query, $this->prepareBindings($bindings), $e
    810โ–•                 );
    811โ–•             }
    812โ–• 
  โžœ 813โ–•             throw new QueryException(
    814โ–•                 $this->getName(), $query, $this->prepareBindings($bindings), $e
    815โ–•             );
    816โ–•         }
    817โ–•     }

  i   A table was not found: You might have forgotten to run your database migrations. 
      https://laravel.com/docs/master/migrations#running-migrations

  1   [internal]:0
      RobersonFaria\DatabaseSchedule\Console\Scheduling\Schedule::__construct()
      +13 vendor frames 

  15  [internal]:0
      RobersonFaria\DatabaseSchedule\Console\Scheduling\Schedule::__construct()

Temporary solution

In vendor/robersonfaria/laravel-database-schedule/src/DatabaseSchedulingServiceProvider.php file

    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
    ...
//        Comment this line when initializing the project
//        $this->app->resolving(BaseSchedule::class, function ($schedule) {
//            $schedule = app(Schedule::class, ['schedule' => $schedule]);
//            return $schedule->execute();
//        });
    ...
    }

Add PHP 8 support

Hi, please add PHP 8 support

robersonfaria/laravel-database-schedule[1.0.0, ..., 1.0.15] require php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.

Duplicate output when send mail

When you put an email to receive the output of the scheduled command, this out put is registred an sended twice.

image

To reproduce the error, run the command without send mail option, after that register an email in the command and run it again.

Command parameters with comments are not recognized

Hi,

at first - thanks a lot for this great repository.

Unfortunately Commands that have Arguments with a comment are not recognized by laravel-database-schedule. Take this Example of the official telescope module:

class PruneCommand extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'telescope:prune {--hours=24 : The number of hours to retain Telescope data}';

The argument --hours is not recognized and therefore can not be set:

grafik

The parameters are collected in src/Http/Services/CommandService.php but unfortunately i can not grasp why
$command->getDefinition()->getArguments()) in line 31 does not retrieve commented arguments. Possibly this is a laravel issue ?

Besides of that, how about an switch to enter a completely custom command as text field in addition to the dropdown for some special cases?

Creation of new tests (PHPUnit)

The package is growing fast and new features are being added constantly, we need to write tests(PHPUnit) to cover most of the features.
It's becoming more and more difficult to test and ensure that everything keeps working after a new pull request.

Update documentation

Various modifications and additions of new functionality have been made, it is necessary to update the documentation(README) to reflect all existing functionality.

If anyone can contribute I appreciate it.

In case of failure, duplicate emails are sent

When selecting to send email on success and failure, when a command fails, duplicate email is sent. I still haven't found a solution to the problem, apparently it's a behavior of the framework.

Case also interests @PedroPMS

`schedule:list` shows no configured schedules

Hi, i am using the very most recent laravel version v8.41.0 and unfortunately after installing robersonfaria/laravel-database-schedule the artisan schedule:list command is always returning nothing, regardless of what i configure in the backend:

grafik

# php artisan schedule:list
+---------+----------+-------------+----------+
| Command | Interval | Description | Next Due |
+---------+----------+-------------+----------+
#

When removing robersonfaria/laravel-database-schedule again, the command displays the tasks defined in App\Console\Kernel.php again as it should. I know this once worked ! Possibly laravel/framework has changed something in recent versions? Can i provide any more debug information ? Or did i forget to register the module somewhere? I am out of clues. Thanks a lot !

Setting verbosity not possible?

Hi, this might be a really stupid question, but I cannot seem to find a way to specify the verbosity. There is neither a dropdown nor a generic input where I could specify additional parameters like "-vv".
Good logging is pretty important for my use case.

not able to change Timezone

Hi, i am using this package and the documentation of this package says i can change timezone with the config file. I have tried but timezone is not picking value from package configuration file (SCHEDULE_TIMEZONE ).

Also i want to put timezone according to user. is there a way to pass timezone in the $schedule array when creating new schedule?

Thankyou

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.