When using the reloader, there are the master and child processes. Your scheduler thread runs in both. You need to prevent the scheduler from running in the master process
if not app.debug or os.environ.get('WERKZEUG_RUN_MAIN') == 'true':
sched = Scheduler()
sched.add_interval_job(test_scheduler, seconds=5)
sched.start()