stop-agenda
Gracefully stop Agenda and cancel recurring jobs
Table of Contents
Install
npm:
npm install stop-agenda
yarn:
yarn add stop-agenda
Usage
You should probably be using Lad's agenda directly instead of this package.
With default options:
const stopAgenda = ;const Agenda = ; const agenda = ; ;
With advanced options including custom cancel query
cancelQuery
and check interval in millisecondscheckIntervalMs
:
const stopAgenda = ;const Agenda = ; const agenda = ; ;
Options
stopAgenda
accepts two arguments(agenda, config)
and returns aPromise
:
-
agenda
(required) - a valid instance of Agenda -
config
(optional) - a configuration object which defaults to:cancelQuery:repeatInterval:$exists: true$ne: null// (uses `process.env.STOP_AGENDA_CHECK_INTERVAL` if set)checkIntervalMs: 500
Contributors
Name | Website |
---|---|
Nick Baugh | http://niftylettuce.com/ |