diff --git a/README.md b/README.md index 8628dd3..2f5d7da 100644 --- a/README.md +++ b/README.md @@ -234,4 +234,20 @@ function myJob(arg1, arg2) { * @throws {Error} Throws an Error if the job is already at max concurrency */ startJob(name, ...args) + + /** + * Run your Job periodically + * + * @param {string} name The name of your Job + * @param {number} interval The interval between run attempts + * @param {...*} args The arguments that will be passed to your Job executor + */ + scheduleJob(name, interval, ...args) + + /** + * Stop Job's periodic runs + * + * @param {string} name The name of your Job + */ + clearSchedule(name) ``` diff --git a/package.json b/package.json index c872bd1..696792d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tnt-scheduler", - "version": "1.1.0", + "version": "1.1.1", "description": "A promise based scheduler with concurrency control", "main": "index.js", "scripts": {