Object -
task :
Scheduler
Represents a ballerina task.
Constructor
__init
(TimerConfiguration | AppointmentConfiguration configs)
- configs TimerConfiguration | AppointmentConfiguration
Methods
Attaches the provided service to the task.
Detach the provided service from the task.
Starts running the task. Task will not run until this has been called.
Stops the task. This will stop, after finish running the existing jobs.
Pauses the task.
Resumes a paused task.
Attaches the provided service to the task.
Parameters
- serviceToAttach service
-
Service which needs to be attached to the task.
- attachment any - ()
-
An optional parameter which needs to passed inside the resources.
-
Return Type
(SchedulerError?) Returns
SchedulerError
if the process failed due to any reason, nil otherwise.
Detach the provided service from the task.
Parameters
- attachedService service
-
service which needs to be detached from the task.
-
Return Type
(SchedulerError?) Returns
SchedulerError
if the process failed due to any reason, nil otherwise.
Starts running the task. Task will not run until this has been called.
-
Return Type
(SchedulerError?) Returns
SchedulerError
if the process failed due to any reason, nil otherwise.
Stops the task. This will stop, after finish running the existing jobs.
-
Return Type
(SchedulerError?) Returns
SchedulerError
if the process failed due to any reason, nil otherwise.
Pauses the task.
-
Return Type
(SchedulerError?) Returns
SchedulerError
if an error is occurred while resuming, nil Otherwise.
Resumes a paused task.
-
Return Type
(SchedulerError?) Returns
SchedulerError
when an error occurred while pausing, nil Otherwise.