[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/classes/task/ -> scheduled_task.php (summary)

Scheduled task abstract class.

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

Defines 20 functions

  get_last_run_time()
  set_last_run_time()
  is_customised()
  set_customised()
  set_minute()
  get_minute()
  set_hour()
  get_hour()
  set_month()
  get_month()
  set_day()
  get_day()
  set_day_of_week()
  get_day_of_week()
  set_disabled()
  get_disabled()
  get_run_if_component_disabled()
  eval_cron_field()
  next_in_list()
  get_next_scheduled_time()

Functions
Functions that are not part of a class:

get_last_run_time()   X-Ref
Get the last run time for this scheduled task.

return: int

set_last_run_time($lastruntime)   X-Ref
Set the last run time for this scheduled task.

param: int $lastruntime

is_customised()   X-Ref
Has this task been changed from it's default config?

return: bool

set_customised($customised)   X-Ref
Has this task been changed from it's default config?

param: bool

set_minute($minute)   X-Ref
Setter for $minute. Accepts a special 'R' value
which will be translated to a random minute.

param: string $minute

get_minute()   X-Ref
Getter for $minute.

return: string

set_hour($hour)   X-Ref
Setter for $hour. Accepts a special 'R' value
which will be translated to a random hour.

param: string $hour

get_hour()   X-Ref
Getter for $hour.

return: string

set_month($month)   X-Ref
Setter for $month.

param: string $month

get_month()   X-Ref
Getter for $month.

return: string

set_day($day)   X-Ref
Setter for $day.

param: string $day

get_day()   X-Ref
Getter for $day.

return: string

set_day_of_week($dayofweek)   X-Ref
Setter for $dayofweek.

param: string $dayofweek

get_day_of_week()   X-Ref
Getter for $dayofweek.

return: string

set_disabled($disabled)   X-Ref
Setter for $disabled.

param: bool $disabled

get_disabled()   X-Ref
Getter for $disabled.

return: bool

get_run_if_component_disabled()   X-Ref
Override this function if you want this scheduled task to run, even if the component is disabled.

return: bool

eval_cron_field($field, $min, $max)   X-Ref
Take a cron field definition and return an array of valid numbers with the range min-max.

param: string $field - The field definition.
param: int $min - The minimum allowable value.
param: int $max - The maximum allowable value.
return: array(int)

next_in_list($current, $list)   X-Ref
Assuming $list is an ordered list of items, this function returns the item
in the list that is greater than or equal to the current value (or 0). If
no value is greater than or equal, this will return the first valid item in the list.
If list is empty, this function will return 0.

param: int $current The current value
param: int[] $list The list of valid items.
return: int $next.

get_next_scheduled_time()   X-Ref
Calculate when this task should next be run based on the schedule.

return: int $nextruntime.



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1