Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
11741227
Commit
11741227
authored
11 years ago
by
Robin Appelman
Browse files
Options
Downloads
Patches
Plain Diff
Update documentation for \OCP\BackgroundJob
parent
d209cac2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/public/backgroundjob.php
+8
-14
8 additions, 14 deletions
lib/public/backgroundjob.php
with
8 additions
and
14 deletions
lib/public/backgroundjob.php
+
8
−
14
View file @
11741227
...
...
@@ -29,21 +29,16 @@
namespace
OCP
;
/**
* This class provides functions to
manage
backgroundjobs in ownCloud
* This class provides functions to
register
backgroundjobs in ownCloud
*
* There are two kind of background jobs in ownCloud: regular tasks and
* queued tasks.
* To create a new backgroundjob create a new class that inharits from either \OC\BackgroundJob\Job,
* \OC\BackgroundJob\QueuedJob or \OC\BackgroundJob\TimedJob and register it using
* \OCP\BackgroundJob->registerJob($job, $argument), $argument will be passed to the run() function
* of the job when the job is executed.
*
* Regular tasks have to be registered in appinfo.php and
* will run on a regular base. Fetching news could be a task that should run
* frequently.
*
* Queued tasks have to be registered each time you want to execute them.
* An example of the queued task would be the creation of the thumbnail. As
* soon as the user uploads a picture the gallery app registers the queued
* task "create thumbnail" and saves the path in the parameter instead of doing
* the work right away. This makes the app more responsive. As soon as the task
* is done it will be deleted from the list.
* 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.
*/
class
BackgroundJob
{
/**
...
...
@@ -77,5 +72,4 @@ class BackgroundJob {
$jobList
=
new
\OC\BackgroundJob\JobList
();
$jobList
->
add
(
$job
,
$argument
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment