Exception handling
It looks there is no way to handle or at least log exceptions thrown inside a scheduled function. Consider this example:
import asyncio
import datetime
from scheduler.asyncio import Scheduler
async def fail():
print('about to fail')
raise Exception('failing intentionally')
async def main():
schedule = Scheduler(loop=asyncio.get_event_loop())
schedule.once(datetime.timedelta(seconds=1), fail)
while True:
await asyncio.sleep(1)
if __name__ == '__main__':
asyncio.run(main())
The only output is:
$ python schedule_demo.py
about to fail