Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

πŸƒβ€β™‚οΈπŸ€– Task and jobs runner. With support of clusters or multiple meteor.js instances.

License

Notifications You must be signed in to change notification settings

veliovgroup/Meteor-CRON-jobs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

46 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

CRON Jobs for meteor

301: This package is moved to the main repository of NPM version, but still can be installed via Atmosphere as Meteor package!

Install:

meteor add ostrio:cron-jobs

Looking for NPM version? - Go to JoSk package

Import:

import { CRONjob } from 'meteor/ostrio:cron-jobs';

Known Issues:

Error: Can't wait without a fiber

Can be easily solved via "bounding to Fiber":

const bound = Meteor.bindEnvironment((callback) => {
  callback();
});

const db   = Collection.rawDatabase();
const cron = new CRONjob({db: db});

const task = (ready) => {
  bound(() => {
    ready();
  });
};

cron.setInterval(task, 60 * 60 * 1000, 'task');