I'm testing the code above, trying to get the idle_seconds:
import schedule, time
def my_job():
print("Running.")
aux_sched = schedule.Scheduler()
aux_sched.every(2).seconds.do(my_job)
while 1:
aux_sched.idle_seconds()
aux_sched.run_pending()
time.sleep(0.5)
But when I'm using a new object of Scheduler Class, I'm getting this error:
Traceback (most recent call last):
File "[ommited]/example.py", line 11, in <module>
aux_sched.idle_seconds()
TypeError: 'float' object is not callable
I'm testing the code above, trying to get the idle_seconds:
But when I'm using a new object of Scheduler Class, I'm getting this error:
Someone know how to fix it?
Env: Python 3.9.16 Schedule 1.2.0 CentOS 9