Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Once every 18 hours #11

Open
dennismonsewicz opened this issue Apr 1, 2014 · 0 comments
Open

Once every 18 hours #11

dennismonsewicz opened this issue Apr 1, 2014 · 0 comments

Comments

@dennismonsewicz
Copy link

Using this Meteorite package, I am slightly confused on how to write a job to run every 18-24 hours?

Here is my code so far:

Meteor.startup(function(){
  console.log('Meteor Startup... Let\'s plug in some jobs...');

  cron = new Cron();
  time = 60*60*24

  if(!Jobs.findOne())
    createInitJobs();

  if(is_prod()) {
    cron.addJob(time, function(){
      createInitJobs();
    })
  }
});

Will my code above run just once or will it run once every day?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant