diff --git a/OCP/BackgroundJob/IJobList.php b/OCP/BackgroundJob/IJobList.php index 65e2f5b6..eeca9864 100644 --- a/OCP/BackgroundJob/IJobList.php +++ b/OCP/BackgroundJob/IJobList.php @@ -57,6 +57,19 @@ interface IJobList { */ public function add($job, $argument = null): void; + /** + * Add a job to the list but only run it after the given timestamp + * + * For cron background jobs this means the job will likely run shortly after the timestamp + * has been reached. For ajax background jobs the job might only run when users are active + * on the instance again. + * + * @param class-string $job + * @param mixed $argument The serializable argument to be passed to $job->run() when the job is executed + * @since 28.0.0 + */ + public function scheduleAfter(string $job, int $runAfter, $argument = null): void; + /** * Remove a job from the list *