I have a scheduled job running on Scheduler library, and I would like to get its status ("Success", "Failed") from python but I can't find documentation on how to get the status.
Let's take as an example the following code to use the scheduler :
import datetime as dt
import time
from scheduler import Scheduler
import scheduler.trigger as trigger
def foo():
print("foo")
schedule = Scheduler()
schedule.minutely(dt.time(second=15), foo)
while True:
schedule.exec_jobs()
time.sleep(1)
I can only print the scheduler but I need to print the status of execution, is it possible ?
>>> print(schedule)
max_exec=inf, tzinfo=None, priority_function=linear_priority_function, #jobs=9
type function due at due in attempts weight
-------- ---------------- ------------------- --------- ------------- ------
MINUTELY foo(..) 2022-03-30 00:37:15 0:00:14 0/inf 1
Please advise