All Projects → bottlerockets → legacy-bottlerockets

bottlerockets / legacy-bottlerockets

Licence: MIT license
Node.js high availability queue and scheduler for background job processing

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to legacy-bottlerockets

linda
Linda is a simple dispatcher library.
Stars: ✭ 12 (-52%)
Mutual labels:  cron, schedule, queue, job
croner
Trigger functions and/or evaluate cron expressions in JavaScript. No dependencies. Most features. All environments.
Stars: ✭ 169 (+576%)
Mutual labels:  cron, schedule, job
Bull
Bull module for Nest framework (node.js) 🐮
Stars: ✭ 356 (+1324%)
Mutual labels:  cron, queue, job
schedule-rs
An in-process scheduler for periodic jobs. Schedule lets you run Rust functions on a cron-like schedule.
Stars: ✭ 93 (+272%)
Mutual labels:  cron, schedule, job
Forest
分布式任务调度平台,分布式,任务调度,schedule,scheduler
Stars: ✭ 231 (+824%)
Mutual labels:  cron, schedule, job
Workq
Job server in Go
Stars: ✭ 1,546 (+6084%)
Mutual labels:  schedule, queue, job
yii2-deferred-tasks
Yii2 extension for handling deferred tasks (background cron jobs)
Stars: ✭ 11 (-56%)
Mutual labels:  cron, queue, background-jobs
cron-schedule
A zero-dependency cron parser and scheduler for Node.js, Deno and the browser.
Stars: ✭ 28 (+12%)
Mutual labels:  cron, schedule, job
Bree
🚥 The best job scheduler for Node.js and JavaScript with cron, dates, ms, later, and human-friendly support. Works in Node v10+ and browsers, uses workers to spawn sandboxed processes, and supports async/await, retries, throttling, concurrency, and graceful shutdown. Simple, fast, and lightweight. Made for @ForwardEmail and @ladjs.
Stars: ✭ 933 (+3632%)
Mutual labels:  cron, job
Shardingsphere Elasticjob
Distributed scheduled job framework
Stars: ✭ 7,369 (+29376%)
Mutual labels:  cron, job
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 (+176%)
Mutual labels:  cron, schedule
Mantra
A simple cron-like scheduler for a single command
Stars: ✭ 24 (-4%)
Mutual labels:  cron, schedule
Crono
A time-based background job scheduler daemon (just like Cron) for Rails
Stars: ✭ 637 (+2448%)
Mutual labels:  cron, schedule
Crontab
Parse Cron Expressions, Compose Cron Expression Strings and Caluclate Execution Dates.
Stars: ✭ 62 (+148%)
Mutual labels:  cron, schedule
Gocron
Easy and fluent Go cron scheduling. This is a fork from https://github.com/jasonlvhit/gocron
Stars: ✭ 605 (+2320%)
Mutual labels:  cron, schedule
Sleepto
An alternative to traditional task schedulers
Stars: ✭ 98 (+292%)
Mutual labels:  cron, schedule
Go Quartz
Simple, zero-dependency scheduling library for Go
Stars: ✭ 118 (+372%)
Mutual labels:  cron, job
Jobber
An alternative to cron, with sophisticated status-reporting and error-handling
Stars: ✭ 1,217 (+4768%)
Mutual labels:  cron, schedule
Cron
A cron expression parser in Rust
Stars: ✭ 132 (+428%)
Mutual labels:  cron, schedule
Factotum
A system to programmatically run data pipelines
Stars: ✭ 158 (+532%)
Mutual labels:  cron, job

[WIP] This project is a work in progress and is not recommended for production use

--

Bottlerockets Logo

NPM Version Linux Build Windows Build Test Coverage

Bottlerockets is a BDD task framework for streaming queued task results with Mocha and Chai. Bottlerockets can be used as a CLI tool or a task queue server to stream human readable statusses of tasks and their JSON results. Bottlerockets creates a CLI and REPL interface for your tasks for simpler debugging and improvements to your development workflow.

Bottlerockets manages and launches your bottlerocket processes. A bottlerocket process is a node process that runs your environment specific tasks and streams test results to your server in JSON format or to your terminal in a mocha spec format. Bottlerockets can also be optimized to run tasks quicker by running multiple tasks in the same process, though this feature is optional. Bottlerockets is built to scale and comes with load balancing algorithms to manage your tasks.

Usage

  • Run a persistent task queue server with mocha-filled results
  • Run tasks with expensive setup/teardown operations quickly
  • Easily scale your bottlerocket processes
  • CLI interface for your bottlerocket tasks
  • Run your bottlerocket tasks in a REPL

Install

npm install -g bottlerockets

Getting Started

Initialize .rockets.js in the root of your project directory:

bottlerockets init

This will create a .bottlerockets.json file:

{
  "rockets": [
    {
      "files": ["rockets/**"],
      "balancer": "round-rocket",
      "maxInstances": 1,
      "maxTasks": 5,
      "sleep": 5
    }
  ]
}
task("welcome")
  .description("This says hello to the enemy")
  .action(function () {
    describe("Name", function () {
      it("is valid", function () {
        expect(args.firstName).to.be.a('string')
        expect(args.lastName).to.be.a('string')
        task.fullName = args.firstName + " " + args.lastName
      })

      it("is not Tom", function () {
        expect(task.firstName).to.not.be.equal('Tom')
      })
    })
  })

Then run the test bottlerocket task by running:

bottlerocket welcome --first-name John --last-name Henrick --western

Bottlerocket CLI

Bottlerockets has CLI commands:

bottlerockets [options] <command>

bottlerocket [options] <task> [args]

The bottlerockets task runner. Run tasks

To run a single project bottlerocket task:

$ bottlerocket --help

  Usage: bottlerocket [options] <task> [args]

  Tasks:

    welcome                 This says hello to the enemy
    help <task>              output help for task

  Options:

    -h, --help              output usage information
    -V, --version           output the version number
    -r, --require <file>    require js files
    -R, --reporter [value]  mocha reporter (default: "spec")
    -V, --verbose <n>       set logging verbosity

Or run a REST server

$ bottlerockets http --port 8080

Starting server... (100%)

REST Server listening on port 8080...

Server

[WIP]

Node Usage

Create a queue with the Bottlerockets launcher:

import Bottlerockets from 'bottlerockets'

/**
 * These are the defaults for a Bottlerockets instance
 */
const rockets = new Bottlerockets({
  // Load balancing method (eg. "round-robin", "queue-doubles")
  balancer: "queue-doubles",

  // Allow up to 5 tasks per single bottlerocket process
  maxTasks: 10,

  // Launch up to 10 bottlerocket processes per instance
  // With maxTasks set to 10, this allows up to 80 tasks
  // to run simultaneously
  maxInstances: 8,

  // Shut down bottlerocket processes that have not been
  // used for 5 minutes
  sleep: 5,
})

// Launch 100 rockets at once
setInterval(function () {
  for (let i = 0; i < 100; i++) {
    rockets.launch("welcome", {
      firstName: "John",
      lastName: "Henrick",
      intruder: false,
    }).success(result => {
      console.log("result", result)
    }).catch(err => {
      console.error("error", err)
    })
  }
}, 1000)

// or even run a REST server which can even be mounted
// as express.js middleware (eg. authentication)
const server = rockets.createServer()
server.listen(8080)

Documentation & Community

License

MIT License. See LICENSE.md file for details.

Contributors

Name GitHub Facebook
Sam Hunter samhunta @samhuntr
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].