struggling days to understand why a schedule like this (running on a pyboardv1.1 fw:1.13):
Code: Select all
async def mycoro():
print('hello world')
await asyncio.sleep(0)
async def main():
asyncio.create_task(schedule(mycoro, hrs=12))
try:
loop = asyncio.get_event_loop()
loop.create_task(main())
loop.run_forever()
except KeyboardInterrupt:
pass
finally:
asyncio.new_event_loop() # Clear retained state
Eventually today, looking at schedule coro definition I discovered the clause:
Onestly I can't figure out how to achive my goal? should the schedule coro return instead of launch the passed function just after 1000secs?maxt = 1000 # uasyncio can't handle arbitrarily long delays
I am missing something?
Hope I explained myself clearly.
Regards