File tree Expand file tree Collapse file tree
core/components/scheduler Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ Scheduler 1.9.0-pl
22------------------
33Released on 2026-01-22
44
5+ - Add $task_key property to the sTask::schedule method to more easily set that [#40]
56- Add recurring tasks support: tasks can automatically reschedule after successful execution
67- Add `scheduleNext()` method to sTask for automatic rescheduling
78- Fix race condition in run.php with atomic status update
Original file line number Diff line number Diff line change @@ -20,13 +20,14 @@ class sTask extends xPDOSimpleObject
2020 * @param array $data
2121 * @return false|sTaskRun
2222 */
23- public function schedule ($ when , array $ data = array ()) {
24-
23+ public function schedule ($ when , array $ data = array (), string $ task_key = '' )
24+ {
2525 /** @var sTaskRun $run */
2626 $ run = $ this ->xpdo ->newObject ('sTaskRun ' );
2727 $ run ->fromArray (array (
2828 'task ' => $ this ->get ('id ' ),
2929 'data ' => $ data ,
30+ 'task_key ' => $ task_key ,
3031 ));
3132 $ run ->setTiming ($ when );
3233
You can’t perform that action at this time.
0 commit comments