Giter VIP home page Giter VIP logo

laravel-schedule-list's People

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

Watchers

 avatar  avatar

laravel-schedule-list's Issues

Breaks laravel 5.5 schedule run

composer require hmazter/laravel-schedule-list results in:
Warning: Ambiguous class resolution, "Cron\AbstractField"

php artisan schedule:run results in:
In FieldFactory.php line 46:
5 is not a valid position

Using laravel 5.5

between() and unlessBetween() aren't factored in

This may be due to the way Laravel handles these two functions differently from other scheduler functions, but this package doesn't seem to take into account between() and unlessBetween().

The following two commands output */10 * * * * * when running php artisan schedule:list

$schedule->command('name-of-command')->everyTenMinutes();

and

$schedule->command('name-of-command')->everyTenMinutes()->between('8:55', '19:00');

Get the result as an array (or object array)

It could be great to add an helper function (or something like that) to get the scheduled tasks as an array. So we could display it in a web interface, or iterate over it to check some things.

Conflict between cron-expression vendors in Laravel 5.6

This package uses mtdowling/cron-expression:

hmazter/laravel-schedule-list  v0.2.1  requires  mtdowling/cron-expression (^1.2)  

but Laravel 5.6 makes use of dragonmantank/cron-expression:

laravel/framework  v5.6.3  requires  dragonmantank/cron-expression (~2.0)  

This appears to be working just fine, but running composer commands results in a list of warnings:

Warning: Ambiguous class resolution, "Cron\DayOfWeekField" was found in both "/var/www/vendor/dragonmantank/cron-expression/src/Cron/DayOfWeekField.php" and "/var/www/vendor/mtdowling/cron-expression/src/Cron/DayOfWeekField.php", the first will be used.
Warning: Ambiguous class resolution, "Cron\CronExpression" was found in both "/var/www/vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php" and "/var/www/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php", the first will be used.
Warning: Ambiguous class resolution, "Cron\FieldFactory" was found in both "/var/www/vendor/dragonmantank/cron-expression/src/Cron/FieldFactory.php" and "/var/www/vendor/mtdowling/cron-expression/src/Cron/FieldFactory.php", the first will be used.
Warning: Ambiguous class resolution, "Cron\MinutesField" was found in both "/var/www/vendor/dragonmantank/cron-expression/src/Cron/MinutesField.php" and "/var/www/vendor/mtdowling/cron-expression/src/Cron/MinutesField.php", the first will be used.
Warning: Ambiguous class resolution, "Cron\HoursField" was found in both "/var/www/vendor/dragonmantank/cron-expression/src/Cron/HoursField.php" and "/var/www/vendor/mtdowling/cron-expression/src/Cron/HoursField.php", the first will be used.
Warning: Ambiguous class resolution, "Cron\MonthField" was found in both "/var/www/vendor/dragonmantank/cron-expression/src/Cron/MonthField.php" and "/var/www/vendor/mtdowling/cron-expression/src/Cron/MonthField.php", the first will be used.
Warning: Ambiguous class resolution, "Cron\AbstractField" was found in both "/var/www/vendor/dragonmantank/cron-expression/src/Cron/AbstractField.php" and "/var/www/vendor/mtdowling/cron-expression/src/Cron/AbstractField.php", the first will be used.
Warning: Ambiguous class resolution, "Cron\FieldInterface" was found in both "/var/www/vendor/dragonmantank/cron-expression/src/Cron/FieldInterface.php" and "/var/www/vendor/mtdowling/cron-expression/src/Cron/FieldInterface.php", the first will be used.
Warning: Ambiguous class resolution, "Cron\DayOfMonthField" was found in both "/var/www/vendor/dragonmantank/cron-expression/src/Cron/DayOfMonthField.php" and "/var/www/vendor/mtdowling/cron-expression/src/Cron/DayOfMonthField.php", the first will be used.

Perhaps it would be wise to depend on the same package as Laravel?

Also because the dependency this package is relying on is deprecated:

NOTE This fork has been deprecated and development moved to https://github.com/dragonmantank/cron-expression. More information can be found in the blog post here. tl;dr - v2.0.0 is a major breaking change, and @dragonmantank can better take care of the project in a separate fork.

No description visible

Hi there,

Thanks for this awesome package, It's really helpful in our production environment!

I have one small problem. The description field is empty under atv least Laravel 5.4 when using the listing. Is there any way to fix this?

Cheers,
Ramon Smit

Question: How long does it take for the update to reach packagist?

Just upgraded Laravel to 5.6
When I do a composer require hmazter/laravel-schedule-list I still get the old composer.json which gives the duplicate require of dragonmantank/cron-expression and mtdowling/cron-expression.

Workaround:
Replace the old content of ./vendor/hmazter/laravel-schedule-list/composer.json with the new version in Git.
Also had to do iffy stuff to ./vendor/composer/installed.json (remove the mtdowling/cron-expression entry)

Real Workaround:
Stay at Laravel 5.5
Wait until packagist updates to the newer version of laravel-schedule-list by checking that the Requires is from dragonmantank on this page:
https://packagist.org/packages/hmazter/laravel-schedule-list

Possible action for hmazter:
poke packagist? Need to read up on how that works.

Unable to get cron schedule list through controller

For whatever reason I'm unable to get cron schedule through a controller to display on the browser. I have the config file published to my local config folder directory.

I get the list of cron commands on the command line window. Just not when I try to get them through a controller.

Not sure if I'm missing something.

Thank you in advance for your help!

Only Laravel 5.6?

Hi guys,

great that you update this package and I like the progress very much.
Unfortunately I can update most of my projects to Laravel 5.6 as other packages need longer to be ready for 5.6. Maybe you can think about alternatives for keeping progress but not use 5.6 commands.

I know you Note: For Laravel version below 5.6 use 0.2.0 tag.
But 0.2.0 does not have the nice new separate class ScheduleList.php which is nice to use in a view.

The comment "dragonmantank/cron-expression does not support Laravel <5.6" on the composer.json is wrong. It does support Laravel 5.5 fine.

Thank you very much.

Add "Status" column

It could be useful, especially on production websites, to see which of scheduled events/commands are running at the moment. This can be determined by getting the mutex for individual scheduled event/command. If the mutex is present, then command either is running or have crashed and haven't removed mutex. Mutexes expire on their own in 1 day.

I'm proposing to add Status table column with Running as one of possible values. No need to write Not Running for other commands.

If other useful statuses could be determined (e.g. last attempt failed), then it also could be displayed.

Quotes not showing up in schedule:list

My console command has an option that can support spaces (e.g. a name).
The schedule:list command however never shows these quotes, neither single nor double quotes are being shown.

Command example:
test:hello --name="John Doe"

shows up as:

test:hello --name=John Doe

But is executed as it is configured.

InvalidArgumentException : Console command definition is empty.

Tried it on Laravel 5.7.3 with 1.1.0 :

$ ./artisan schedule:list

   InvalidArgumentException  : Console command definition is empty.

  at /vagrant/project/vendor/laravel/framework/src/Illuminate/Console/Parser.php: 44
  40:      */
  41:     protected static function name($expression)
  42:     {
  43:         if (trim($expression) === '') {
  44:             throw new InvalidArgumentException('Console command definition is empty.');
  45:         }
  46:
  47:         if (! preg_match('/[^\s]+/', $expression, $matches)) {
  48:             throw new InvalidArgumentException('Unable to determine command name from signature.');
  49:         }

  Exception trace:

  1   Illuminate\Console\Parser::name("")
      /vagrant/project/vendor/laravel/framework/src/Illuminate/Console/Parser.php : 22

  2   Illuminate\Console\Parser::parse("")
      /vagrant/project/vendor/hmazter/laravel-schedule-list/src/ScheduleEvent.php : 115

  Please use the argument -v to see more details.

It seems this package doesn't support callback based scheduling jobs as outlined at https://laravel.com/docs/5.7/scheduling#defining-schedules ?

In a project of mine I've >15 scheduled tasks and almost all are defined via ->call() because I wrap the executed code for logging purpose.

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.