Meteor Js : How to configure a cron call ?

Some times we need that the application can to call a function in a time interval , to do this it’s necessary to setup a cron.

Example : ( server side )

new Cron(function () {
    dosomething();
}, {
    minute: 48,
    hour: 18
});
var dosomething = function () {
    try {
        do {
            {...}
        } while (conditional);
      
    } catch (error) {
        console.log("Error:", error);
    }
    console.log("Do something")
};

1 Comment

  1. Υоu actuɑlly make it apрear sօ easy wіth your presentation buut Ι
    find this topic to be actuɑlly sоmething that I belieѵе I would Ƅy no means understand.
    It ѕeems too complex and extremely lɑrge fߋr mе. I’m taking a loоk ahed to your subsequent post, I will attempt tto get tɦe
    cling of іt!

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s