ali-eltaweel/batch-processor

There is no license information available for the latest version (1.0.0) of this package.

Run system processes in batches.

1.0.0 2025-06-21 18:04 UTC

This package is auto-updated.

Last update: 2025-06-21 18:07:01 UTC


README

Run system processes in batches

Installation

Install batch-processor via Composer:

composer require ali-eltaweel/batch-processor

Usage

use BatchProcessor\BatchProcessor;

$processes = [
  [ 'command' => [ 'tar', '-czf', 'dir1.tar.gz', 'dir1' ] ],
  [ 'command' => [ 'tar', '-czf', 'dir2.tar.gz', 'dir2' ] ]
];

$processor = new BatchProcessor($processes, maxConcurrentProcesses: 2);

$processor->start();