All Projects → msavin → Stevejobs

msavin / Stevejobs

Licence: other
A simple jobs queue that just works (for Meteor.js)

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Stevejobs

Workq
Job server in Go
Stars: ✭ 1,546 (+692.82%)
Mutual labels:  schedule, jobs, queue
4minitz
4Minitz - Simply a decent free webapp for taking collaborative meeting minutes. (Keywords: Meeting Protocols, Action Items, Open Source). Check it out on our demo server:
Stars: ✭ 125 (-35.9%)
Mutual labels:  mongodb, meteor
Meteor
Meteor, the JavaScript App Platform
Stars: ✭ 42,739 (+21817.44%)
Mutual labels:  mongodb, meteor
Meteor Peerdb
Reactive database layer with references, generators, triggers, migrations, etc.
Stars: ✭ 128 (-34.36%)
Mutual labels:  mongodb, meteor
Meteor Collection2
A Meteor package that extends Mongo.Collection to provide support for specifying a schema and then validating against that schema when inserting and updating.
Stars: ✭ 1,020 (+423.08%)
Mutual labels:  mongodb, meteor
Wp Missed Schedule
Find only missed schedule posts, every 15 minutes, and republish correctly 10 items each session. The Original plugin (only this) no longer available on WordPress.org for explicit author request! Compatible with WP 2.1+ to 4.9+ and 5.0-beta3 (100.000+ installs 300.000+ downloads 2016-04-13) Please: do not install unauthorized malware cloned forked!
Stars: ✭ 69 (-64.62%)
Mutual labels:  schedule, jobs
Kepler
The open source full-stack geosocial network platform
Stars: ✭ 125 (-35.9%)
Mutual labels:  mongodb, meteor
Schedule
Schedule module for Nest framework (node.js) ⏰
Stars: ✭ 137 (-29.74%)
Mutual labels:  schedule, jobs
Minimongoexplorer
Handy Google Chrome extension for reviewing MiniMongo.
Stars: ✭ 131 (-32.82%)
Mutual labels:  mongodb, meteor
Wekan Mongodb
Docker: Wekan <=> MongoDB
Stars: ✭ 130 (-33.33%)
Mutual labels:  mongodb, meteor
Activejob Scheduler
A background job scheduler for any queue backend
Stars: ✭ 24 (-87.69%)
Mutual labels:  schedule, queue
Phive Queue
$queue->push('I can be popped off after', '10 minutes');
Stars: ✭ 161 (-17.44%)
Mutual labels:  mongodb, queue
Fennel
A task queue library for Python and Redis
Stars: ✭ 24 (-87.69%)
Mutual labels:  jobs, queue
Foundatio
Pluggable foundation blocks for building distributed apps.
Stars: ✭ 1,365 (+600%)
Mutual labels:  jobs, queue
Meteor Collection Hooks
Meteor Collection Hooks
Stars: ✭ 641 (+228.72%)
Mutual labels:  mongodb, meteor
Meteor Astronomy
Model layer for Meteor
Stars: ✭ 608 (+211.79%)
Mutual labels:  mongodb, meteor
Machinery
Machinery is an asynchronous task queue/job queue based on distributed message passing.
Stars: ✭ 5,821 (+2885.13%)
Mutual labels:  mongodb, queue
Swoole Jobs
🚀Dynamic multi process worker queue base on swoole, like gearman but high performance.
Stars: ✭ 574 (+194.36%)
Mutual labels:  jobs, queue
Laravel Database Schedule
Manage your Laravel Task Scheduling in a friendly interface and save schedules to the database.
Stars: ✭ 94 (-51.79%)
Mutual labels:  schedule, scheduled-tasks
Meteor Partitioner
Transparently divide a single meteor app into several different instances shared between different groups of users.
Stars: ✭ 153 (-21.54%)
Mutual labels:  mongodb, meteor

Steve Jobs

The Simple Jobs Queue That Just Works

Run scheduled tasks with Steve Jobs, the simple jobs queue made just for Meteor. With tight MongoDB integration and fibers-based timing functions, this package is quick, reliable and effortless to use.

  • Jobs run on one server at a time
  • Jobs run predictably and consecutively
  • Jobs, their history and returned data are stored in MongoDB
  • Failed jobs are retried on server restart
  • No third party dependencies

The new 4.0 features repeating jobs, async support and more! It can run hundreds of jobs in seconds with minimal CPU impact, making it a reasonable choice for many applications. To get started, check out the documentation and the quick start below.

Developer Friendly GUI and API

In addition to a simple API, the Steve Jobs package offers an in-app development tool. After installing the main package, run the package command below and press Control + J in your app to open it.

meteor add msavin:sjobs-ui-blaze

Note: this package may be a little bit flakey, and might not work if audit-argument-checks is present. Unfortunately, I had lost the source code, and will probably rebuild the package once there is a good reason to do so.

Quick Start

First, install the package, and import if necessary:

meteor add msavin:sjobs
import { Jobs } from 'meteor/msavin:sjobs'

Then, write your background jobs like you would write your methods:

Jobs.register({
    "sendReminder": function (to, message) {
        const instance = this;

        const call = HTTP.put("http://www.magic.com/email/send", {
            to: to,
            message: message,
            subject: "You've Got Mail!",
        })

        if (call.statusCode !== 200) {
            instance.reschedule({
                in: {
                    minutes: 5
                }
            });
        } else {
            return call.data;
        }
    }
});

Finally, schedule a background job like you would call a method:

Jobs.run("sendReminder", "[email protected]", "The future is here!");

One more thing: the function above will schedule the job to run on the moment that the function was called, however, you can delay it by passing in a special configuration object at the end:

Jobs.run("sendReminder", "[email protected]", "The future is here!", {
    in: {
        days: 3,
    }, 
    on: {
        hour: 9,
        minute: 42
    },
    priority: 9999999999
});

The configuration object supports date, in, on, priority, singular, unique, and data, all of which are completely optional. For more information, see the Jobs.run documentation.

Repeating Jobs

Compared to a CRON Job, the Steve Jobs package gives you much more control over how and when the job runs. To get started, you just need to create a job that replicates itself.

Jobs.register({
    "syncData": function () {
        const instance = this;
        const call = HTTP.put("http://www.magic.com/syncData")

        if (call.statusCode === 200) {
            instance.replicate({
                in: {
                    hours: 1
                }
            });
            
            // to save storage, you can remove the document
            instance.remove();
        } else {
            instance.reschedule({
                in: {
                    minutes: 5
                }
            });
        }
    }
});

Then, you need to "kickstart" the queue by creating the first job to run. By using the singular flag, you can ensure that Meteor will only create the job if there is no pending or failed instance of it.

Meteor.startup(function () {
    Jobs.run("syncData", {
        singular: true
    })    
})

Documentation

Jobs.register and Jobs.run are all you need to get started, but that's only the beginning of what the package can do. To explore the rest of the functionality, jump into the documentation:


Steve Jobs is an MIT-licensed project, brought to you by Meteor Candy.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].