Job Types
The Schedule Plugin supports various job types that can be used to schedule and manage jobs in your application. Below are the available job types with descriptions of their functionality.
enum JobType {
Cron = 'cron',
Interval = 'interval',
Date = 'date',
Timeout = 'timeout'
}
Cron Job
A Cron Job is a job that is scheduled to run at specific intervals based on a cron expression. You can define the cron expression to specify when the job should be executed. If you want to learn more about cron expressions, you can refer to the Cron Expression Documentation.
Schedule Plugin offers some examples of cron expressions that can be used to schedule jobs:
enum CronExpression {
EverySecond = '* * * * * *',
Every5Seconds = '*/5 * * * * *',
...
EveryWeek = '0 0 0 * * 0',
Weekdays = '0 0 0 * * 1-5',
...
}
Interval Job
An Interval Job is a job that is scheduled to run at regular intervals. You can specify the interval duration in milliseconds, and the job will be executed repeatedly after the specified interval.
Date Job
A Date Job is a job that is scheduled to run at a specific date and time. You can specify the exact date and time when the job should be executed.
Timeout Job
A Timeout Job is a job that is scheduled to run after a specified delay. You can specify the delay duration in milliseconds, and the job will be executed once after the specified delay.