title: Not able register hapi-cron-job plugin
body: <p>I am trying to schedule cronjobs which will run at specified time, i am using <code>hapi-cron-job</code> of <code>hapi</code>, when i try to register the plugin, i am getting below error.</p>
  <pre><code>[1] &quot;plugin.register&quot; must be of type function
      at Object.exports.apply (D:\my_dir\Repositories\repo-cronjobs\node_modules\@hapi\hapi\lib\config.js:19:15)
      at internals.Server.register (D:\my_dir\Repositories\repo-cronjobs\node_modules\@hapi\hapi\lib\server.js:454:31)
      at processTicksAndRejections (internal/process/task_queues.js:95:5)
  </code></pre>
  <p>Please find the configuration while registering the plugin.</p>
  <p>server.js</p>
  <pre><code>  const { plugins } = require('./register/index');
  
    await server
      .register(plugins)
      .then(() =&gt; {})
      .catch(err =&gt; {
        console.error('Plugin registeration failed!');
        console.error(err);
      });
  </code></pre>
  <p>index.js</p>
  <pre><code>module.exports.plugins = [
    // I have here other pluguns, passing this array for registration in server.js 
    require(&quot;./hapi-cron-job-plugin&quot;)
  ];
  </code></pre>
  <p>hapi-cron-job-plugin.js</p>
  <pre><code>const hapiCronJob = require('hapi-cron-job')
  const plugin = {
    register: require('hapi-cron-job'),
    options: {
      jobs: [
        {
          name: &quot;diplay time&quot;,
          enabled: true,
          immediate: true,
          schedule: &quot;every 1 s&quot;,
          execute: alertSystemAdminAndDispatcher,
          environments: ['development', 'staging']
        }
      ],
    }
  }
  
  module.exports = plugin;
  </code></pre>
  <p>nodeJS version: <code>v14.17.3</code></p>
  <p>Hapi-cron-job: <code>&quot;hapi-cron-job&quot;: &quot;^2.0.1&quot;</code></p>