diff --git a/.gitignore b/.gitignore index 7a47d39bab..8d89feb4b6 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,7 @@ storage/ssl storage/api/* storage/data-sources/logs/* storage/decision-tables/* +storage/saved_search_advanced_configuration/* npm.sh laravel-echo-server.lock public/.htaccess diff --git a/ProcessMaker/Managers/TaskSchedulerManager.php b/ProcessMaker/Managers/TaskSchedulerManager.php index cd93db4e6d..b12c3049da 100644 --- a/ProcessMaker/Managers/TaskSchedulerManager.php +++ b/ProcessMaker/Managers/TaskSchedulerManager.php @@ -12,6 +12,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Schema; +use InvalidArgumentException; use Illuminate\Support\Str; use PDOException; use ProcessMaker\Facades\WorkflowManager; @@ -201,10 +202,11 @@ private function processTaskWithAtomicClaim(ScheduledTask $task, DateTime $today { try { $config = json_decode($task->configuration); - $lastExecution = new DateTime($task->last_execution, new DateTimeZone('UTC')); - if ($lastExecution === null) { - return; + // SCHEDULED_JOB rows use last_execution = null until first run; BPMN timers always set last_execution. + $lastExecution = null; + if ($task->last_execution !== null && $task->last_execution !== '') { + $lastExecution = new DateTime($task->last_execution, new DateTimeZone('UTC')); } $owner = $task->processRequestToken ?: $task->processRequest ?: $task->process; @@ -688,6 +690,9 @@ public function scheduleCycle( */ public function scheduleCycleJob($interval, array $config): ScheduledTask { + if (!isset($config['job'])) { + throw new InvalidArgumentException('$config["job"] is required'); + } $configuration = [ 'type' => 'TimeCycle', 'interval' => $interval, @@ -704,6 +709,36 @@ public function scheduleCycleJob($interval, array $config): ScheduledTask return $scheduledTask; } + /** + * Schedule a job for a specific datetime + * + * @param string $datetime in ISO-8601 format + * @param array $config configuration + * + * @return ScheduledTask + */ + public function scheduleDateJob($datetime, array $config): ScheduledTask + { + if (!isset($config['job'])) { + throw new InvalidArgumentException('$config["job"] is required'); + } + + // Must use "interval" so nextDate(TimeDate) picks up the target datetime (same shape as BPMN timer tasks). + $configuration = [ + 'type' => 'TimeDate', + ...$config, + 'interval' => $datetime, + ]; + + $scheduledTask = new ScheduledTask(); + $scheduledTask->configuration = json_encode($configuration); + $scheduledTask->type = 'SCHEDULED_JOB'; + $scheduledTask->last_execution = null; + $scheduledTask->save(); + + return $scheduledTask; + } + /** * Schedule a job execution after a time duration for the given BPMN element, * event definition and an optional Token object diff --git a/composer.json b/composer.json index 5fe0d8c2c3..0c89adfb08 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "processmaker/processmaker", - "version": "2026.9.3", + "version": "2026.9.4-RC1", "description": "BPM PHP Software", "keywords": [ "php bpm processmaker" @@ -176,7 +176,7 @@ "package-product-analytics": "1.5.11", "package-projects": "1.12.9", "package-rpa": "1.1.2", - "package-savedsearch": "1.43.13", + "package-savedsearch": "1.43.12-RC1", "package-slideshow": "1.4.3", "package-smart-extract": "0.0.6", "package-signature": "1.15.5", diff --git a/config/filesystems.php b/config/filesystems.php index 809b4718f7..3fa45d5637 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -136,6 +136,13 @@ // Others declared in packages // - translations - package-translations // - 'filesystems.disks.install' configured on the fly + + 'saved_search_advanced_configuration' => [ + 'driver' => 'local', + 'root' => storage_path('saved_search_advanced_configuration'), + 'url' => env('APP_URL') . '/storage/saved_search_advanced_configuration', + 'visibility' => 'private', + ], ], /* diff --git a/package-lock.json b/package-lock.json index 169b6cc347..f95f9faf2d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@processmaker/processmaker", - "version": "2026.9.3", + "version": "2026.9.4-RC1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@processmaker/processmaker", - "version": "2026.9.3", + "version": "2026.9.4-RC1", "hasInstallScript": true, "license": "ISC", "dependencies": { diff --git a/package.json b/package.json index b73db6ff33..abc5983b1c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@processmaker/processmaker", - "version": "2026.9.3", + "version": "2026.9.4-RC1", "description": "ProcessMaker 4", "author": "DevOps ", "license": "ISC",