import discord from discord.ext import tasks client = discord.Client() @tasks.loop(seconds = 10) # repeat after every 10 seconds async def myLoop(): # your work myLoop.start() client.run("token")