If I have something like this:
Foo = function (bar_) {
this.bar = bar_;
this.run = function() {
cron.schedule('*/5 * * * * *', function() {
console.log(/*this.bar?*/);
});
}
var myvar = new Foo("mybar");
myvar.run();
How can I set the cron to print out this.bar's value at the time this.run is called? I've tried with this.bar and it returns undefined
.