title: Nodejs node-schedule npm is throwing error "this.job.execute is not a function"
body: <p>I'm new to nodejs and I have written a nodejs program and scheduling it every minute using the node-schedule. but after running for some time and generating a couple of logs at the console, nodejs throws error that <code>this.job.execute is not a function</code> </p>
  
  <p>here is the code I am using:</p>
  
  <pre><code>var nodeSchedule = require('node-schedule');
  
  runJob();
  
  function runJob(){
      console.log("start");
      nodeSchedule.scheduleJob('0 * * * * *',require('./prodModules.js'));
  
  }
  </code></pre>
  
  <p>the logs I am getting is:</p>
  
  <pre><code>C:\Users\1060641\Downloads\NodeJS HealthReport\Collector&gt;node src\main\nodejs\collector_main.js
  start
  Connected
  Ready
  logged in as Super User
  nfs_check running...
  NFS Check completed
  snapchart_check running...
  C:\Users\1060641\node_modules\node-schedule\lib\schedule.js:177
      this.job.execute();
               ^
  
  TypeError: this.job.execute is not a function
      at Job.invoke (C:\Users\1060641\node_modules\node-schedule\lib\schedule.js:177:14)
      at null._onTimeout (C:\Users\1060641\node_modules\node-schedule\lib\schedule.js:445:11)
      at Timer.listOnTimeout (timers.js:92:15)
  
  C:\Users\1060641\Downloads\NodeJS HealthReport\Collector&gt;
  </code></pre>
  
  <p>I don't think there is anything wrong with my <code>prodModules.js</code> since running it standalone its running fine.
  Scheduling is throwing errors.</p>
  
  <p>Please help.</p>