0

Actually am learning python APScheduler in this am trying one example

d={'a':{'status':'n'},'b':{'status':'n'},'c':{'status':'y'}}

The scheduler what i added is like below

for k,v in d.items():
if d[k]['status']=='n':
    sched.add_interval_job(f,minutes=1)
    d[k]['status']='y'

But this scheduler starts every 1 minute and call function f,how to stop scheduler calling this function, f if their are no entries in dict with status 'n' and how to continue this scheduler calling if their are entries with status 'n' in dict d.

user1182090
  • 301
  • 4
  • 7
  • 20

1 Answers1

1

You can unschedule jobs using sched.unschedule_job(job_function.job) as per the docs.

L-R
  • 1,214
  • 1
  • 19
  • 40