1. Go to this page and download the library: Download preneomit/scheduler library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
preneomit / scheduler example snippets
use Scheduler\GreedyScheduler;
$scheduler = new GreedyScheduler();
$input = [
'timezone' => 'UTC',
'startAt' => '2025-01-06T09:00:00Z',
'cases' => [
[
'caseId' => 'case-1',
'dueBy' => '2025-01-06T17:00:00Z',
'restorations' => [
[
'restorationId' => 'rest-1',
'productionLineId' => 'line-1',
'steps' => [
[
'stepId' => 'a1111111-1111-4111-8111-111111111111',
'restorationId' => 'rest-1',
'cess assignments
foreach ($result['assignments'] as $assignment) {
echo "Step {$assignment['stepId']} assigned to {$assignment['employeeId']}\n";
echo "Start: {$assignment['startAt']->format('c')}\n";
echo "End: {$assignment['endAt']->format('c')}\n";
}
// Check for delays
if (!empty($result['delayReport']['delayedCases'])) {
foreach ($result['delayReport']['delayedCases'] as $delayed) {
echo "Case {$delayed['caseId']} is late by {$delayed['lateness']}\n";
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.