hmazter / laravel-schedule-list

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

Add "Status" column #8

Closed aik099 closed 3 years ago

aik099 commented 7 years ago

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.

hmazter commented 7 years ago

Interesting, I will look into this!

aik099 commented 7 years ago

Digging deeper the cache mutex I mentioned is only set, when command is marked as without overlapping (not default mode). Otherwise no way to determine if scheduled command is being executed right now.

Also interesting fact: you can schedule not only commands, but also:

In case of jobs it's just being added to queue and you can't actually see how long it took (from scheduled event) to execute it.

hmazter commented 5 years ago

An old issue but here is a PR that could add this feature #25