title: Sending message to a specific channel at a specific time using cron in Discord
body: <p>I want to send a message to a specific channel at 2:00 AM in Discord. I can't get it to work. Am I doing something wrong?</p>
  <p>Here's my code:</p>
  <pre class="lang-js prettyprint-override"><code>const Discord = require(&quot;discord.js&quot;)
  const cron = require(&quot;cron&quot;)
  const client = new Discord.Client()
  let channel = &quot;ID#&quot;
  
  let job = new cron.CronJob('0 00 2 * * *', () =&gt; {
  client.channels.cache.get(channel).send(&quot;Hello!!&quot;)
  })
  
  job.start()
  
  client.login(&quot;Server#&quot;)
  </code></pre>