title: Edit the tasks created using node-cron
body: <p>Trying to run the tasks based on schedule using node-cron '<a href="https://github.com/merencia/node-cron" rel="noreferrer">https://github.com/merencia/node-cron</a>'.</p>
  
  <p>Task creation and starting it:</p>
  
  <pre><code>var cron = require('node-cron'),
  task = cron.schedule('* * * * * *', function () {
      console.log('task running...',JSON.stringify(task));
      }, false);
  task.start();
  </code></pre>
  
  <p>To stop the task:</p>
  
  <pre><code>task.stop();
  </code></pre>
  
  <p>To destroy the task:</p>
  
  <pre><code>task.destroy();
  </code></pre>
  
  <p>The code works fine when tasks are executed within the scope of where they are created. But as per the requirement how can i access the 'task' later from a different function. Can the task be stored in the backend to perform 'stop()' or 'destroy()' functions on it later.
  If not possible with the node-cron what else can be used.
  Working with node.js and mongoDb.</p>