Class: DateJobDefinition
A class representing a date-based job definition.
Extends
Constructors
Constructor
new DateJobDefinition(
name,date,execute,initiallyDisabled?):DateJobDefinition
Parameters
name
string
date
Date
execute
() => Promise<void>
initiallyDisabled?
boolean
Returns
DateJobDefinition
Overrides
Properties
initiallyDisabled
readonlyinitiallyDisabled:boolean=false
Inherited from
JobDefinition.initiallyDisabled
lastExecutionTime?
protectedoptionallastExecutionTime?:Date
Inherited from
JobDefinition.lastExecutionTime
name
readonlyname:string
Inherited from
trigger
protectedreadonlytrigger:JobTrigger
Overrides
type
readonlytype:JobType=JobType.Date
Overrides
Methods
changeTrigger()
protectedchangeTrigger(trigger):void
Parameters
trigger
Returns
void
Inherited from
execute()
execute():
Promise<void>
Executes the job.
Returns
Promise<void>
A promise resolving when the job has been executed.
Inherited from
getLastExecutionTime()
getLastExecutionTime():
Date|undefined
Gets the last execution time of the job.
Returns
Date | undefined
The last execution time, or undefined if the job has not been executed yet.
Inherited from
JobDefinition.getLastExecutionTime
getNextExecutionTime()
getNextExecutionTime():
Date|undefined
Gets the next execution time of the job.
Returns
Date | undefined
The next execution time, or undefined if the job has no more executions.
Inherited from
JobDefinition.getNextExecutionTime
updateDate()
updateDate(
date):void
Updates the date for the job.
Parameters
date
Date
The new date.
Returns
void
fromMetadata()
staticfromMetadata(metadata,execute):JobDefinition
Creates a job definition from metadata.
Parameters
metadata
The metadata for the job.
execute
() => Promise<void>
The function to execute when the job runs.
Returns
The created job definition.