-
-
Save jasonVeld/7877ff4c5171234257cb to your computer and use it in GitHub Desktop.
node-schedule erroneously schedules immediately rather than on specified date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'), | |
path = require('path'), | |
os = require('os'), | |
fs = require('fs'); | |
var deferred = require('deferred'); | |
var schedule = require('node-schedule'); | |
var handler_1 = function() { | |
console.log("Handler 1 running"); | |
}; | |
var handler_2 = function(param) { | |
return function() { | |
console.log("Handler 2 running"); | |
} | |
}; | |
var start_date = new Date(1411999200000); | |
var h = handler_2('test'); | |
console.log("handler type: " + typeof(h)); | |
console.log("scheduling job... "); | |
schedule.scheduleJob(new Date('15 October 2014'), h ); | |
OUTPUT: | |
========================== | |
handler type: function | |
scheduling job... | |
Handler 2 running |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment