title: discord.py how to send a message everyday at a specific time
body: <p>I want to create a discord bot that sends 2 messages every day each at a specific time. The following code will make the messages enter a loop and will send a message every 5 seconds for example. How can I set a specific time to send the messages every day, for example, message 1 at 6 pm and message 2 at 10 am.
  I found this code <a href="https://stackoverflow.com/a/57634182/13491523">Here</a>, but did not find what I want.</p>
  <pre><code>import discord
  from discord.ext import commands, tasks
  
  bot = commands.Bot(&quot;$&quot;)
  channel_id = #Any ID
  
  #Message 1
  @tasks.loop(seconds=5)
  async def called_once_a_day():
    message_channel = bot.get_channel(channel id)
    await message_channel.send(&quot;test 1&quot;)
  
  @called_once_a_day.before_loop
  async def before():
      await bot.wait_until_ready()
      print(&quot;Finished waiting&quot;)
  #Message 2 
  @tasks.loop(seconds=10)
  async def called_once_a_day2():
      message_channel = bot.get_channel(channel id)
      await message_channel.send(&quot;test 2&quot;)
  
  @called_once_a_day2.before_loop
  async def before():
      await bot.wait_until_ready()
      print(&quot;Finished waiting&quot;)
  
  
  
  
  called_once_a_day.start()
  called_once_a_day2.start()
  
  bot.run('token')
  </code></pre>