Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

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

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: 233 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

task_base:: (10 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()

namespace:: (8 methods):
  set_fail_delay()
  get_fail_delay()
  set_timestarted()
  get_timestarted()
  set_hostname()
  get_hostname()
  set_pid()
  get_pid()


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

Class: namespace  - X-Ref

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

param: int $faildelay

get_fail_delay()   X-Ref
Getter for $faildelay.

return: int

set_timestarted($timestarted = null)   X-Ref
Setter for $timestarted.

param: int $timestarted

get_timestarted()   X-Ref
Getter for $timestarted.

return: int

set_hostname($hostname = null)   X-Ref
Setter for $hostname.

param: string $hostname

get_hostname()   X-Ref
Getter for $hostname.

return: string

set_pid($pid = null)   X-Ref
Setter for $pid.

param: int $pid

get_pid()   X-Ref
Getter for $pid.

return: int