web / lib/services/schedule-service
lib/services/schedule-service
Service for managing periodic execution of scheduled imports.
Coordinates the execution of the schedule manager job at regular intervals, ensuring scheduled imports are checked and triggered when due. Provides lifecycle management for the scheduling system with configurable intervals.
Classes
ScheduleService
Constructors
Constructor
new ScheduleService(
payload,config):ScheduleService
Parameters
payload
BasePayload
config
ScheduleServiceConfig = {}
Returns
Methods
start()
start():
void
Starts the schedule service.
Returns
void
stop()
stop():
void
Stops the schedule service.
Returns
void
triggerScheduleManager()
triggerScheduleManager():
Promise<void>
Manually trigger the schedule manager.
Returns
Promise<void>
getStatus()
getStatus():
object
Gets the current status of the schedule service.
Returns
object
isRunning
isRunning:
boolean
isActive
isActive:
boolean
config
config:
Required<ScheduleServiceConfig>
Functions
getScheduleService()
getScheduleService(
payload,config?):ScheduleService
Gets or creates the schedule service instance.
Parameters
payload
BasePayload
config?
ScheduleServiceConfig
Returns
startScheduleService()
startScheduleService(
payload,config?):ScheduleService
Starts the schedule service with the given Payload instance.
Parameters
payload
BasePayload
config?
ScheduleServiceConfig
Returns
stopScheduleService()
stopScheduleService():
void
Stops the schedule service.
Returns
void