hmazter / laravel-schedule-list

Laravel package to add command to list all scheduled artisan commands
MIT License
94 stars 14 forks source link

Add column in console output showing withoutOverlapping-locks, closes #8 #25

Closed hmazter closed 4 years ago

hmazter commented 6 years ago

This PR adds a column in the console output that shows the status of overlapping lock. The column is only shown if at least one scheduled item uses withoutOverlapping()

Output:

+------------+---------------------+-------------------+----------------------------------------+------------------+
| expression | next run at         | command           | description                            | overlapping lock |
+------------+---------------------+-------------------+----------------------------------------+------------------+
| 0 10 * * * | 2018-09-24 10:00:00 | test:command:name | Description of event                   | N/A              |
| 0 10 * * * | 2018-09-24 10:00:00 | test:command:two  | Description of test command            | N/A              |
| 0 3 * * 1  | 2018-10-01 03:00:00 | ls -lah           |                                        | N/A              |
| 0 13 * * * | 2018-09-24 13:00:00 | Closure           | A description for a scheduled callback | N/A              |
| 0 14 * * * | 2018-09-24 14:00:00 | Closure           | TestJob                                | N/A              |
| 0 0 * * *  | 2018-09-25 00:00:00 | ls                |                                        | Not locked       |
| 0 0 * * *  | 2018-09-25 00:00:00 | cd                |                                        | Locked           |
+------------+---------------------+-------------------+----------------------------------------+------------------+