<p>We need to configure health check for our service which uses apscheduler to schedule and run the jobs. The idea is to check if apscheduler is running jobs fine at the specified time or working as expected.</p>
<p>We tried scheduler.running, but it shows true when it's not able to pick next jobs. Any suggestions here?</p>

<p>You can use add_listener() and can listen to only particular types of events by giving the appropriate mask argument to add_listener(), OR’ing the different constants together. The listener callable is called with one argument, the event object.</p>
<p>Example:</p>
<pre><code>def my_listener(event):
    if event.exception:
        print('The job crashed :(')
    else:
        print('The job worked :)')

scheduler.add_listener(my_listener, EVENT_JOB_EXECUTED | EVENT_JOB_ERROR)
</code></pre>
<p>Refer to this <a href="https://apscheduler.readthedocs.io/en/3.x/userguide.html#scheduler-events" rel="nofollow noreferrer">document</a> for more information.</p>
