aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/BackgroundJob
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-01-26 00:14:00 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-01-26 10:43:01 +0100
commit9ef6148bfabea0581a0fb4b696d17c1d7379754a (patch)
tree3a1b98c74b8186d76cfa8fee102bf628d7ce9f78 /lib/public/BackgroundJob
parentb9bbb894f8b01e000bb5e3a8a82db7bebad3ea00 (diff)
downloadnextcloud-server-9ef6148bfabea0581a0fb4b696d17c1d7379754a.tar.gz
nextcloud-server-9ef6148bfabea0581a0fb4b696d17c1d7379754a.zip
Deprecated OCP interface to fetch background job type
* was not used by apps and also is not needed * migrated the documentation to IJobList Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/public/BackgroundJob')
-rw-r--r--lib/public/BackgroundJob/IJobList.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/public/BackgroundJob/IJobList.php b/lib/public/BackgroundJob/IJobList.php
index c074e5c9d59..0a909411688 100644
--- a/lib/public/BackgroundJob/IJobList.php
+++ b/lib/public/BackgroundJob/IJobList.php
@@ -29,6 +29,19 @@ namespace OCP\BackgroundJob;
/**
* Interface IJobList
*
+ * This interface provides functions to register background jobs
+ *
+ * To create a new background job create a new class that inherits from either
+ * \OC\BackgroundJob\Job, \OC\BackgroundJob\QueuedJob or
+ * \OC\BackgroundJob\TimedJob and register it using ->add($job, $argument),
+ * $argument will be passed to the run() function of the job when the job is
+ * executed.
+ *
+ * A regular job will be executed every time cron.php is run, a QueuedJob will
+ * only run once and a TimedJob will only run at a specific interval which is to
+ * be specified in the constructor of the job by calling
+ * $this->setInterval($interval) with $interval in seconds.
+ *
* @package OCP\BackgroundJob
* @since 7.0.0
*/