The scheduler class is used to run functions with a low-overhead CPU cost, as well as pass cached arguments & data. This allows single functions to double as asynchronous logic that can be used across exchanges & currencies.
A scheduler can be created by calling
|callback||Fill with a function reference to be called in the scheduler thread.||callable|
|interval||Time interval for the given function to run.||str or int/float|
|initially_stopped||Optional boolean. If set to ||bool|
|synced||Align the scheduler with intervals in UTC. ex: if the interval is '1h' then with sync it will only run at *:00||bool|
|**kwargs||Arguments to pass into the callback function. This can be used to distinguish what the logic in the callback should do.||Any|
|A scheduler object||Scheduler|
Start a scheduler. This only needs to be used if
initially_stopped is set to
|force||Optional argument to override any duplicate thread protection.||bool|
Get the interval in seconds that the scheduler is running on.
|The scheduler interval in seconds||str|
Get the custom arguments that were passed during construction.
|A dictionary containing all the key/value pairs that were added during construction.||dict|
Raise a stop flag that will be checked on the next scheduler run & stop the thread.
Get the callback function that the scheduler is attached to.
|The callable object passed in during object construction.||callable|