Can we limit APScheduler to run 100 times only?
<p>I am using <a href="http://apscheduler.readthedocs.io/en/latest/userguide.html" rel="noreferrer">APScheduler</a> to run a python method in every 5 minutes. It's working perfectly. I need to limit the scheduled job iteration to 100. After the 100 iteration it should close the process. I have checked the reference document but I am unable to find any option which provide this feature. We have option to control number of job instance but not the max iteration. Does anyone has idea about that? </p>

<pre><code>from apscheduler.schedulers.blocking import BlockingScheduler

def job():
    print "Decorated job"

scheduler = BlockingScheduler()
scheduler.add_job(job, 'interval', minutes=5)
scheduler.start()
</code></pre>

<p>OR
if I get the scheduled job iteration count then I can also remove the running job from code itself like below. </p>

<pre><code>scheduler = BlockingScheduler()
scheduler.add_job(job, 'interval', minutes=5, id='my_job_id')

#iterationCount ??

if (iterationCount = 100 ):
    scheduler.remove_job('my_job_id')
    exit(0)
scheduler.start()
</code></pre>