title: running a fastify route periodically (via cron)
body: <p>I would like to run a particular <code>fastify</code> route periodically. There is <a href="https://www.npmjs.com/package/fastify-cron" rel="nofollow noreferrer">fastify-cron</a> but I can't figure out if I can use that to call a route from within <code>fastify</code>. To summarize, given a route as below, I would like <code>https://my/server/greeting</code> to be called every midnight.</p>
  <pre class="lang-js prettyprint-override"><code>fastify.get('/greeting', function (request, reply) {
    reply.send({ hello: 'world' })
  })
  </code></pre>