cron.js icon indicating copy to clipboard operation
cron.js copied to clipboard

jobs with step speicified not working

Open darren opened this issue 14 years ago • 2 comments

here's a patch:

diff --git a/cron.js b/cron.js index 0c7ef86..160d544 100644 --- a/cron.js +++ b/cron.js @@ -77,7 +77,7 @@ var CronJob = (function(){

             field.replace(rangePattern, function($0, lower, upper, step) {
  •                step = step || 1;
    
  •                step = step && parseInt(step) || 1;
    
                 // Positive integer higher than constraints[0]
                 lower = Math.max(low, ~~Math.abs(lower));
    

darren avatar Oct 09 '10 08:10 darren

Hi James, Did you include this patch in the current version or the issue is still open? It is a pity you stopped working on cron.js. Either I was very unlucky searching for a scheduling library for Node, or there are not many better alternatives to yours around.

G.

giacecco avatar Mar 05 '12 07:03 giacecco

@Darren Sorry for the, urr, delay. I'm interested in how your fix works. In what cases were steps not working?

@giacecco Not sure what happened. tbh, oddly, I've never even needed cron jobs in JS -- this was a hobby project at the time, if I remember correctly. Anyway, I'm making an effort to re-visit my older repos and apply fixes where necessary. :) Regarding node though, are you following the node-specific fork of this script? - https://github.com/ncb000gt/node-cron

padolsey avatar Apr 18 '13 16:04 padolsey