TimedJob¶
-
class
OCP\BackgroundJob\
TimedJob
¶ - Simple base class to extend to run periodic background jobs.Call setInterval with your desired interval in seconds from the constructor.
Source: lib/public/BackgroundJob/TimedJob.php#38 Parent: OCP\BackgroundJob\Job
Properties¶
-
protected static property
OCP\BackgroundJob\TimedJob::$
interval
¶ Source: lib/public/BackgroundJob/TimedJob.php#40 Type: int
Methods¶
-
public
OCP\BackgroundJob\TimedJob::
setInterval
($seconds)¶ - set the interval for the job
Source: Parameters: - $seconds (int) the time to pass between two runs of the same job in seconds
Since: 15.0.0
-
public final
OCP\BackgroundJob\TimedJob::
execute
($jobList, $logger=null)¶ - run the job if the last run is is more than the interval ago
Source: Parameters: - $jobList (
OC\BackgroundJob\JobList
) - $logger (
OCP\ILogger
| null)
Since: 15.0.0
- $jobList (