@norvento/scheduler
v3.0.0-alpha.2
Published
### Config properties:
Downloads
156
Keywords
Readme
Norvento scheduler
Config properties:
Schedule pattern:
Please refer to https://github.com/node-schedule/node-schedule#cron-style-scheduling to see the available schedule patterns
Example:
const jobTest = new JobTest("test", "test job", "*/1 * * * *");
await Scheduler.scheduleJob(jobTest);
Doc
Table of Contents
Job
Job
Parameters
execute
Method the job has to execute. The child class must overwrite this method
stop
Stops the job
start
Starts the job
reschedule
Reschedules the job with the given cron pattern
Parameters
cron
string the cron pattern
clearErrors
Deletes all stored errors
getNextInvocation
Gets the next job invocation
addError
Adds a new error
Parameters
error
Error
getErrors
Returns all the stored errors
onSuccess
Function called when the job finishes successfully
onError
Function called when the process finished because of an error
onFinish
Function called when the job finished
Scheduler
Scheduler
scheduleJob
Schedules a new job
Parameters
job
Job the job to schedule
getJob
Gets the job with the given code
Parameters
jobCode
string