Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/VeliovGroup/Meteor-CRON-jobs
🏃♂️🤖 Task and jobs runner. With support of clusters or multiple meteor.js instances.
https://github.com/VeliovGroup/Meteor-CRON-jobs
cluster cron cron-jobs job-scheduler jobs meteor meteor-package scheduled-tasks scheduler task tasks
Last synced: about 2 months ago
JSON representation
🏃♂️🤖 Task and jobs runner. With support of clusters or multiple meteor.js instances.
- Host: GitHub
- URL: https://github.com/VeliovGroup/Meteor-CRON-jobs
- Owner: veliovgroup
- License: bsd-3-clause
- Archived: true
- Created: 2016-02-19T02:22:36.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-06-19T22:23:01.000Z (over 5 years ago)
- Last Synced: 2024-08-04T01:04:57.955Z (5 months ago)
- Topics: cluster, cron, cron-jobs, job-scheduler, jobs, meteor, meteor-package, scheduled-tasks, scheduler, task, tasks
- Homepage: https://atmospherejs.com/ostrio/cron-jobs
- Size: 49.8 KB
- Stars: 15
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-meteor - ostrio:cron-jobs - Package with similar API to native `setTimeout` and `setInterval` methods, but synced between all running Meteor.js (Node.js) instances. (Packages)
- awesome-meteor - ostrio:cron-jobs - Package with similar API to native `setTimeout` and `setInterval` methods, but synced between all running Meteor (NodeJS) instances. (Cron Jobs)
README
# CRON Jobs for meteor
__301: This package is moved to the main repository of [NPM version](https://github.com/VeliovGroup/josk), but still can be installed via Atmosphere as Meteor package!__
## Install:
```shell
meteor add ostrio:cron-jobs
```Looking for NPM version? - Go to [JoSk package](https://github.com/VeliovGroup/josk)
## Import:
```js
import { CRONjob } from 'meteor/ostrio:cron-jobs';
```## Known Issues:
```log
Error: Can't wait without a fiber
```Can be easily solved via "bounding to Fiber":
```js
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');
```