Skip to content

Commit

Permalink
set seconds to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Condon committed Sep 8, 2011
1 parent cc02015 commit ca0267c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/cron.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ CronTime.prototype = {
} }
if (!(date.getMinutes() in this.minute)) { if (!(date.getMinutes() in this.minute)) {
date.setMinutes(date.getMinutes()+1); date.setMinutes(date.getMinutes()+1);
date.setSeconds(0);
continue; continue;
} }


Expand Down Expand Up @@ -260,6 +261,11 @@ exports.timeout = function(cronTime)
return new CronTime(cronTime).timeout(); return new CronTime(cronTime).timeout();
} }


console.log(new Date());
var sendAt = exports.sendAt('01 30 11 * * *');

console.log(sendAt);

exports.CronJob = CronJob; exports.CronJob = CronJob;
exports.CronTime = CronTime; exports.CronTime = CronTime;


0 comments on commit ca0267c

Please sign in to comment.