how do you run a job every 10 mins? #57

Closed
pateljatin opened this Issue Apr 5, 2013 · 1 comment

Comments

Projects
None yet
3 participants

Hi,
I'm trying to use this and wondering how to run/schedule a job every 10 mins?

Thanks,
Jatin

maltzj commented Apr 5, 2013

You want to set the cronTime parameter of your object to "0 */10 * * * *". So your job would look like

job = new cronJob({
    cronTime: "0 */10 * * * *"
    onTick: function(){
        console.log("Doing stuff");
    }
    start: true,
});

You can find more examples in the docs.

@ncb000gt ncb000gt closed this Apr 5, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment