title: Multiple instances of @tasks.loop in cog
body: <p>I'm developping a Discord bot that scrape posts on reddit. Now I created a command so that I can fetch x amount of posts every y amount of time with @tasks.loop(time=y). Built the command in a cog, loaded it into the bot and it works as expected.</p>
  <p>Now my problem is that as far as I understand only one instance of this command can run at once. i.e if I run the command in a server it will work fine, but I will not be able to run the command into another server until I .cancel() the running instance.</p>
  <p>I was wondering if there was some way to have multiple instances running. Like a way to name the loop or something or if I should use another functionality of Discord.py to be able to achieve what I'm trying to do.</p>
  <p>Edit:
  I ommited some parameters in the code for simplicity's sake, but here is the code in question</p>
  <pre><code>def launch_client():
  bot = Bot()
  reddit = client.Client()
  
  bot.add_cog(ScheduleCog(bot, reddit))
  </code></pre>
  <pre><code>class ScheduleCog(commands.Cog):
      time_unit = {'seconds': 1, 'minutes': 60, 'hours': 3600, 'days': 86400, 'weeks': 604800}
      def __init__(self, bot, reddit):
          self.bot = bot
          self.reddit = reddit
  
      def cog_unload(self):
          self.schedule_loop.cancel()
  
      @tasks.loop(seconds=1)
      async def schedule_loop(self, ctx, sub, sort, limit, time):
          posts = await self.reddit.get_posts(sub, sort, limit, time)
  
          if posts is not None:
              for post in posts:
                  await ctx.channel.send(post.url)
          else:
              await ctx.channel.send('Error in your request. Please validate fields.')
  
      @schedule_loop.before_loop
      async def before_schedule_loop(self):
          await self.bot.wait_until_ready()
  
      @commands.command()
      async def subschedule(self, ctx, interval: int, interval_unit: str, sub: str, sort: str, limit: int,
                            time: str = 'hot'):
          unit: int = self.time_unit[interval_unit]
          self.schedule_loop.change_interval(seconds=interval * unit)
          self.schedule_loop.start(ctx, sub, sort, limit, time)
  
      @commands.command()
      async def subschedulestop(self, ctx):
          self.schedule_loop.cancel()
  </code></pre>
  <p>So I've written this accord to the official discord.ext.tasks <a href="https://discordpy.readthedocs.io/en/latest/ext/tasks/index.html" rel="nofollow noreferrer">documentation</a>.</p>
  <p>Now everything works as intended for the loop. I launch the subschedule() command and it send the posts every 'x' interval of 'y' unit of time.</p>
  <p>Now as mentionned in the original question, is that it works in a single instance and I don't know how to have multiple instances. I want to be able to run multiple subschedule() instances in different guilds or even multiple in the same one, but as it works right now when I call the command again I get the Runtime error 'Task is already launched and is not completed'.</p>
  <p>I simply want to know the correct method to be able to run multiple tasks in parallel.</p>