Git Product home page Git Product logo

cron.js's People

Contributors

padolsey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cron.js's Issues

Just seconds pattern not working. "05 * * * * * "

Should this pattern work?

var CronJob = require('cron').CronJob;
new CronJob('05 * * * * *', function(){
console.log('You will see this message every second');
}, null, true, "America/Los_Angeles");

Translate cronTime statement

I want to translate this statement into your cron standard: ( there a lot of standards but don't work for my statement)
The Job runs :

  • every weekday (Monday through Friday)
  • every 15 minutes from 08:00:00 to 18:00:00 .
    Can anyone do it for me?

day of week range wrong

day of week range is set as [1,7] in cron.js, but the specification is [0,6], with 0 representing sunday, and 6 saturday.

Also the README.md is wrong by stating 2-6 is Monday through Friday. In fact, 2-6 is Tuesday through Saturday

License?

Hey James,

Thanks for this library. I know you don't really support it anymore but the node-cron package won't work for me (not running in a node environment). I'd like to use this, but it doesn't seem to have a license attached and the client I'm working for requires that. Any chance you could add one? Cheers.

Patrick

Clear cron job

Hello.
I need to delete cronJob object. How can i do it?

Dont work in December !!!! ????

In my tests don't work only for December.

I change this line
this.constraints = [[0,59],[0,59],[0,23],[1,31],[0,11],[1,7]];

for thi one
this.constraints = [[0,59],[0,59],[0,23],[1,31],[1,12],[1,7]];

and work now !

It's correct ? or maybe there are more changes to do ?

i have a problem when use loop to create cron

1ใ€
var CronJob = require('cron').CronJob;
for (var i = 0; i < 2; i++) {
new CronJob('* * * * * *', consoleLog(i), null, true, 'America/Los_Angeles');
}
function consoleLog(i) {
console.log(i);
}

when i run this code ,the job run only once and will not continute

2ใ€
var CronJob = require('cron').CronJob;
for (var i = 0; i < 2; i++) {
new CronJob('* * * * * *', function () {
console.log(i);
}, null, true, 'America/Los_Angeles');
}

when i run the code above ,i get
2
2
rather than
0
1

jobs with step speicified not working

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));
    

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.