kavanpancholi / processlist
A platform-independent way to retrieve the list of processes running on your systems. It works both on the Windows and Unix platforms.
Installs: 27
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/kavanpancholi/processlist
This package is not auto-updated.
Last update: 2025-10-26 09:55:38 UTC
README
A platform-independent way to retrieve the list of processes running on your systems. It works both on the Windows and Unix platforms.
Add following line to your config/app.php under providers list
Kavanpancholi\Processlist\ProcesslistServiceProvider::class,
Run
composer dump-autoload
Steps to check if artisan command already running or not
Command File: e.g. Inspire.php in Console/Command
Use
use Kavanpancholi\Processlist\ProcessList;
Check for process in handler
public function handle(ProcessList $processList)
{
    $isRunning = $processList->checkRunningCommand('command:name');
    if (!$isRunning) {
        // Do something
    }
    echo "This process is already running".PHP_EOL;
}