Use the @aiocron.crontab decorator to schedule tasks
masterThe simplest way to schedule an asynchronous function is by using the @aiocron.crontab decorator. This will automatically schedule the decorated function to run according to the provided cron expression when the asyncio event loop is running.
Note: aiocron uses cronsim for parsing cron expressions. Ensure your expressions are compatible with cronsim.
import aiocron
import asyncio
@aiocron.crontab('*/30 * * * *')
async def attime():
print('run')
asyncio.get_event_loop().run_forever()