Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schd_cleaner可以使用ioloop #1

Open
LiuYuguang opened this issue May 5, 2022 · 0 comments
Open

schd_cleaner可以使用ioloop #1

LiuYuguang opened this issue May 5, 2022 · 0 comments

Comments

@LiuYuguang
Copy link

import asyncio

async def schd_cleaner(seconds, interval):
    while True:
        await asyncio.sleep(interval)
        # do something

if __name__ == '__main__':
    ioloop = asyncio.get_event_loop()
    ioloop.create_task(schd_cleaner(7*86400, 600))
    ioloop.run_forever()
    pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant