Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 39 and 310] [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]

Abstract class for common properties of scheduled_task and adhoc_task.

Copyright: 2013 Damyon Wiese
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 154 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

task_base:: (12 methods):
  set_lock()
  set_cron_lock()
  get_lock()
  get_next_run_time()
  set_next_run_time()
  get_cron_lock()
  set_blocking()
  is_blocking()
  set_component()
  get_component()
  set_fail_delay()
  get_fail_delay()


Class: task_base  - X-Ref

Abstract class for common properties of scheduled_task and adhoc_task.

set_lock(\core\lock\lock $lock)   X-Ref
Set the current lock for this task.

param: \core\lock\lock $lock

set_cron_lock(\core\lock\lock $lock)   X-Ref
Set the current lock for the entire cron process.

param: \core\lock\lock $lock

get_lock()   X-Ref
Get the current lock for this task.

return: \core\lock\lock

get_next_run_time()   X-Ref
Get the next run time for this task.

return: int timestamp

set_next_run_time($nextruntime)   X-Ref
Set the next run time for this task.

param: int $nextruntime

get_cron_lock()   X-Ref
Get the current lock for the entire cron.

return: \core\lock\lock

set_blocking($blocking)   X-Ref
Setter for $blocking.

param: bool $blocking

is_blocking()   X-Ref
Getter for $blocking.

return: bool

set_component($component)   X-Ref
Setter for $component.

param: string $component

get_component()   X-Ref
Getter for $component.

return: string

set_fail_delay($faildelay)   X-Ref
Setter for $faildelay.

param: int $faildelay

get_fail_delay()   X-Ref
Getter for $faildelay.

return: int