bree
Advanced tools
Comparing version 1.1.24 to 1.1.25
@@ -808,5 +808,5 @@ const EventEmitter = require('events'); | ||
// | ||
// validate jobs | ||
// make sure jobs is an array | ||
// | ||
if (!Array.isArray(jobs)) throw new Error('Jobs must be an Array'); | ||
if (!Array.isArray(jobs)) jobs = [jobs]; | ||
@@ -813,0 +813,0 @@ const names = this.config.jobs.map((j) => j.name); |
{ | ||
"name": "bree", | ||
"description": "The best job scheduler for Node.js with support for cron, dates, ms, later, and human-friendly strings. Uses workers to spawn sandboxed processes, and supports async/await, retries, throttling, concurrency, and cancelable promises (graceful shutdown). Simple, fast, and the most lightweight tool for the job. Made for Forward Email and Lad.", | ||
"version": "1.1.24", | ||
"version": "1.1.25", | ||
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)", | ||
@@ -6,0 +6,0 @@ "ava": { |
@@ -277,6 +277,10 @@ <h1 align="center"> | ||
// add a job after initialization: | ||
// add a job array after initialization: | ||
bree.add(['boop']); | ||
// this must then be started using one of the above methods | ||
// add a job after initialization: | ||
bree.add('boop'); | ||
// this must then be started using one of the above methods | ||
// remove a job after initialization: | ||
@@ -283,0 +287,0 @@ bree.remove('boop'); |
73065
749