CronJob
extends NamedBaseContent
in package
Implement cron job setup object
In the fileAccess context most contents are children of this class. With this class the DAB for cron jobs is implemented. Cron jobs are named objects.
Tags
Table of Contents
- $keyregex : string
- The main key must match this regex
- __construct() : mixed
- Construct a new cron job object
- Copy() : Result
- copy entity in file system and git repository this method can copy this content object in our local storage system to a new one
- Delete() : Result
- delete entity from file system and git repository this method can delete this content object from our local storage system
- Executable() : null|CronJob
- Get the executable This method moves the executable to the executable folder and provides an instance of it.
- GetPath() : string|null
- IsActive() : bool
- Is active Return the value of the active state property
- IsAwaited() : bool
- Check if run at is in range test if the provided run at set is inside the current time
- Name() : string
- Get the name directly
- Priority() : int
- The priority
- Save() : Result
- No automatic if allocation for named based contents
- UpdateAttributeName() : Result
- Callback on update validate name This function is called when the primary identifier is changed
Properties
$keyregex
The main key must match this regex
private
string
$keyregex
= '/^[a-z0-9A-Z]+$/'
Methods
__construct()
Construct a new cron job object
public
__construct([string|null $id = null ][, string $language = null ]) : mixed
Parameters
- $id : string|null = null
-
The object name/id or null for new one
- $language : string = null
-
The object language or null for raw one
Return values
mixed —Copy()
copy entity in file system and git repository this method can copy this content object in our local storage system to a new one
public
Copy([string $target = null ]) : Result
Parameters
- $target : string = null
-
The target name
Return values
Result —A default system result set
Delete()
delete entity from file system and git repository this method can delete this content object from our local storage system
public
Delete([bool $skip = false ]) : Result
Parameters
- $skip : bool = false
-
Skip hooks on demand
Return values
Result —A default system result set
Executable()
Get the executable This method moves the executable to the executable folder and provides an instance of it.
public
Executable() : null|CronJob
The executable is loaded from the source code property
Return values
null|CronJob —GetPath()
public
GetPath() : string|null
Tags
Return values
string|null —IsActive()
Is active Return the value of the active state property
public
IsActive() : bool
Return values
bool —The status of the cronjob
IsAwaited()
Check if run at is in range test if the provided run at set is inside the current time
public
IsAwaited(int $time) : bool
Parameters
- $time : int
Return values
bool —indicator if this job is active now
Name()
Get the name directly
public
Name() : string
Return values
string —Priority()
The priority
public
Priority() : int
Return values
int —Save()
No automatic if allocation for named based contents
public
Save([bool $force_new_id = false ]) : Result
Parameters
- $force_new_id : bool = false
Return values
Result —UpdateAttributeName()
Callback on update validate name This function is called when the primary identifier is changed
public
UpdateAttributeName(object $attr, string $data) : Result
Parameters
- $attr : object
-
The changed attribute
- $data : string
-
The new attribute value
Return values
Result —A system result object