mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 19:13:49 +00:00
[cron-job] allow a cronjob to pass data from one execution to another
When a cronjob is executed, it may return an array of data. This data will be passed as parameter on the next execution
This commit is contained in:
@@ -19,5 +19,13 @@ interface CronJobInterface
|
||||
|
||||
public function getKey(): string;
|
||||
|
||||
public function run(): void;
|
||||
/**
|
||||
* Execute the cronjob
|
||||
*
|
||||
* If data is returned, this data is passed as argument on the next execution
|
||||
*
|
||||
* @param array $lastExecutionData the data which was returned from the previous execution
|
||||
* @return array|null optionally return an array with the same data than the previous execution
|
||||
*/
|
||||
public function run(array $lastExecutionData): null|array;
|
||||
}
|
||||
|
Reference in New Issue
Block a user