{"_id":"@1999/scheduler","_rev":"10-6d763499c4636b5acc6957d88293332e","name":"@1999/scheduler","description":"Node.js library for periodical tasks","dist-tags":{"latest":"0.0.9"},"versions":{"0.0.1":{"name":"@1999/scheduler","version":"0.0.1","description":"Node.js library for periodical tasks","config":{"access":"public"},"main":"dist/index.js","jsnext:main":"dist/index.js","types":"dist/index.d.ts","engines":{"npm":">=5","node":">=8"},"scripts":{"build":"rm -fr dist/ && ./node_modules/.bin/tsc","lint":"tslint  -p . -c tslint.json './**/*.ts'","prepublishOnly":"npm run build","test:unit":"mocha --reporter spec --require ts-node/register --slow 10000 --timeout 10000 './**/*-spec.ts'","test":"npm run lint && npm run test:base"},"repository":{"type":"git","url":"git+https://github.com/1999/scheduler.git"},"author":{"name":"Dmitrii Sorin","email":"info@staypositive.ru"},"license":"MIT","bugs":{"url":"https://github.com/1999/scheduler/issues"},"files":["dist","src"],"homepage":"https://github.com/1999/scheduler#readme","dependencies":{"debug":"^3.1.0","ts-node":"^3.3.0","typescript":"^2.5.3","uuid":"^3.1.0"},"devDependencies":{"@types/debug":"0.0.30","@types/mocha":"^2.2.44","@types/node":"^8.0.47","@types/sinon":"^2.3.7","@types/uuid":"^3.4.3","mocha":"^4.0.1","sinon":"^4.0.2","tslint":"^5.8.0"},"gitHead":"fee88d4f76932633ea620f2b3eb4feb50c52f167","_id":"@1999/scheduler@0.0.1","_npmVersion":"5.4.2","_nodeVersion":"8.7.0","_npmUser":{"name":"1999","email":"info@staypositive.ru"},"dist":{"integrity":"sha512-liVDhoMqIf6Ld0kk59pEhR+cVzOPlxP9GDHDSFVbYn1Lv66z3YQ++ZoYTjnkmLZM1XUZUbvRJhP+DrprMhwXXw==","shasum":"713bb84bbfb42508cc2bafaf5820165a50d632a1","tarball":"https://registry.npmjs.org/@1999/scheduler/-/scheduler-0.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8qoLa6sWMvUyOnMPx325x5uyzUysEXk5Hhug79qLkAgIgdmVEC/iEBl25tcLq75Vi9ojCY5E9j8M1iXrGHW7S6i8="}]},"maintainers":[{"name":"1999","email":"info@staypositive.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scheduler-0.0.1.tgz_1509282494491_0.17076478921808302"},"directories":{}},"0.0.2":{"name":"@1999/scheduler","version":"0.0.2","description":"Node.js library for periodical tasks","config":{"access":"public"},"main":"dist/index.js","jsnext:main":"dist/index.js","types":"dist/index.d.ts","engines":{"npm":">=5","node":">=8"},"scripts":{"build":"rm -fr dist/ && ./node_modules/.bin/tsc","lint":"tslint  -p . -c tslint.json './**/*.ts'","prepublishOnly":"npm run build","test:unit":"mocha --reporter spec --require ts-node/register --slow 10000 --timeout 10000 './**/*-spec.ts'","test":"npm run lint && npm run test:base"},"repository":{"type":"git","url":"git+https://github.com/1999/scheduler.git"},"author":{"name":"Dmitrii Sorin","email":"info@staypositive.ru"},"license":"MIT","bugs":{"url":"https://github.com/1999/scheduler/issues"},"homepage":"https://github.com/1999/scheduler","dependencies":{"debug":"^3.1.0","ts-node":"^3.3.0","typescript":"^2.5.3","uuid":"^3.1.0"},"devDependencies":{"@types/debug":"0.0.30","@types/mocha":"^2.2.44","@types/node":"^8.0.47","@types/sinon":"^2.3.7","@types/uuid":"^3.4.3","mocha":"^4.0.1","sinon":"^4.0.2","tslint":"^5.8.0"},"gitHead":"dc1ead7cbc19229ecf345381d11bb2b57fb7e1cc","_id":"@1999/scheduler@0.0.2","_npmVersion":"5.4.2","_nodeVersion":"8.7.0","_npmUser":{"name":"1999","email":"info@staypositive.ru"},"dist":{"integrity":"sha512-lXHtVwbn012VBle47+6tZAbnuj8KvDknc5h7DVrswtLEvC5MMRGM37bNnS1VB9LpGjnWYksAiQ2eZq2x6Ju4JA==","shasum":"6651c9bb0e39b6f8f1a2dff2138a24bb3ce67677","tarball":"https://registry.npmjs.org/@1999/scheduler/-/scheduler-0.0.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGp3kKj3+LHeLGSTnbObWUwePFgzRenInRJ6N9FvcgmwAiEAg9LKGUjHK567SFaCgutVGyRhl3YEJsBtbmcoy15svg0="}]},"maintainers":[{"name":"1999","email":"info@staypositive.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scheduler-0.0.2.tgz_1509282670213_0.39886522199958563"},"directories":{}},"0.0.3":{"name":"@1999/scheduler","version":"0.0.3","description":"Node.js library for periodical tasks","config":{"access":"public"},"main":"dist/index.js","jsnext:main":"dist/index.js","types":"dist/index.d.ts","engines":{"npm":">=5","node":">=8"},"scripts":{"build":"rm -fr dist/ && ./node_modules/.bin/tsc","lint":"tslint  -p . -c tslint.json 'src/**/*.ts'","prepublishOnly":"npm run build","test:unit":"mocha --reporter spec --require ts-node/register --slow 10000 --timeout 10000 'src/**/*-spec.ts'","test":"npm run lint && npm run test:unit"},"repository":{"type":"git","url":"git+https://github.com/1999/scheduler.git"},"author":{"name":"Dmitrii Sorin","email":"info@staypositive.ru"},"license":"MIT","bugs":{"url":"https://github.com/1999/scheduler/issues"},"homepage":"https://github.com/1999/scheduler","dependencies":{"debug":"^3.1.0","ts-node":"^3.3.0","typescript":"^2.5.3","uuid":"^3.1.0"},"devDependencies":{"@types/debug":"0.0.30","@types/mocha":"^2.2.44","@types/node":"^8.0.47","@types/sinon":"^2.3.7","@types/uuid":"^3.4.3","mocha":"^4.0.1","sinon":"^4.0.2","tslint":"^5.8.0"},"gitHead":"c59c9f0873d6129ca5e056dc5da33b0b28f1fea6","_id":"@1999/scheduler@0.0.3","_npmVersion":"5.4.2","_nodeVersion":"8.7.0","_npmUser":{"name":"1999","email":"info@staypositive.ru"},"dist":{"integrity":"sha512-sBfMKPXQypZW802Qb++kp8b4CDnNfHHfSkatozZ+zLKHx1DhmsiTnmSURWmLLbGvMZwIGvZH5bqky4afG7uQcw==","shasum":"5ce498d94215a1fdb5fd83578cfada7b52224d7d","tarball":"https://registry.npmjs.org/@1999/scheduler/-/scheduler-0.0.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHQxemvDU8JUBQTjMWliitPNfomblzaoj0pMbCiMOd2MAiEAvO+6AHM7O47ftXYFEhGGEara/6U0bfeLdS7TFwftwds="}]},"maintainers":[{"name":"1999","email":"info@staypositive.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scheduler-0.0.3.tgz_1509308876845_0.09064102685078979"},"directories":{}},"0.0.4":{"name":"@1999/scheduler","version":"0.0.4","description":"Node.js library for periodical tasks","config":{"access":"public"},"main":"dist/index.js","jsnext:main":"dist/index.js","types":"dist/index.d.ts","engines":{"npm":">=5","node":">=8"},"files":["dist","src"],"scripts":{"build":"rm -fr dist/ && ./node_modules/.bin/tsc","lint":"tslint  -p . -c tslint.json 'src/**/*.ts'","prepublishOnly":"npm run build","test:unit":"mocha --reporter spec --require ts-node/register --slow 10000 --timeout 10000 'src/**/*-spec.ts'","test":"npm run lint && npm run test:unit"},"repository":{"type":"git","url":"git+https://github.com/1999/scheduler.git"},"author":{"name":"Dmitrii Sorin","email":"info@staypositive.ru"},"license":"MIT","bugs":{"url":"https://github.com/1999/scheduler/issues"},"homepage":"https://github.com/1999/scheduler","dependencies":{"debug":"^3.1.0","ts-node":"^3.3.0","typescript":"^2.5.3","uuid":"^3.1.0"},"devDependencies":{"@types/debug":"0.0.30","@types/mocha":"^2.2.44","@types/node":"^8.0.47","@types/sinon":"^2.3.7","@types/uuid":"^3.4.3","mocha":"^4.0.1","sinon":"^4.0.2","tslint":"^5.8.0"},"gitHead":"8db97b73df02dd587fe59e2f2d0f0914d65828c9","_id":"@1999/scheduler@0.0.4","_npmVersion":"5.4.2","_nodeVersion":"8.7.0","_npmUser":{"name":"1999","email":"info@staypositive.ru"},"dist":{"integrity":"sha512-1OcMGl+BdM9CM1Bp4ULnZ1SL9DfAcD9j0ZV36L+lzN0KdB/XlzRmZTe5ec03SeztgOqiF964ECXCUiAKaohmhA==","shasum":"0f8e0757052f8276907075c53d4f96055a971f47","tarball":"https://registry.npmjs.org/@1999/scheduler/-/scheduler-0.0.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5CSMf51CLbHa40HOiqyzNtgLDI57iy2JtCiQ7zMfFTAIhAOzFWlxDprzuc9ro4IWxMH8Ukf/vQPYCWAc8wqzWD84r"}]},"maintainers":[{"name":"1999","email":"info@staypositive.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scheduler-0.0.4.tgz_1509308967230_0.9997444858308882"},"directories":{}},"0.0.5":{"name":"@1999/scheduler","version":"0.0.5","description":"Node.js library for periodical tasks","config":{"access":"public"},"main":"dist/index.js","jsnext:main":"dist/index.js","types":"dist/index.d.ts","engines":{"npm":">=5","node":">=8"},"files":["dist","src"],"scripts":{"build":"rm -fr dist/ && ./node_modules/.bin/tsc","lint":"tslint  -p . -c tslint.json 'src/**/*.ts'","prepublishOnly":"npm run build","test:unit":"mocha --reporter spec --require ts-node/register --slow 10000 --timeout 10000 'src/**/*-spec.ts'","test":"npm run lint && npm run test:unit"},"repository":{"type":"git","url":"git+https://github.com/1999/scheduler.git"},"author":{"name":"Dmitrii Sorin","email":"info@staypositive.ru"},"license":"MIT","bugs":{"url":"https://github.com/1999/scheduler/issues"},"homepage":"https://github.com/1999/scheduler","dependencies":{"debug":"^3.1.0","ts-node":"^3.3.0","typescript":"^2.5.3","uuid":"^3.1.0"},"devDependencies":{"@types/debug":"0.0.30","@types/mocha":"^2.2.44","@types/node":"^8.0.47","@types/sinon":"^2.3.7","@types/uuid":"^3.4.3","mocha":"^4.0.1","sinon":"^4.0.2","tslint":"^5.8.0"},"gitHead":"9a44e7b3b2ed5e905d6e8ae32df327ee416e2ab1","_id":"@1999/scheduler@0.0.5","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"1999","email":"info@staypositive.ru"},"dist":{"integrity":"sha512-UzQFipi4DefnjNUTnt/tPJgmMLnDDCao9vkRDj10zrkiKxLqWSEem3JTYEMi+L6O7AY46HQLtqqrxhlAmWvjLg==","shasum":"2d8b57d993d9b9c916fdc2b6f7d3b1c49a706f8f","tarball":"https://registry.npmjs.org/@1999/scheduler/-/scheduler-0.0.5.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC6NfXFmkl0VF71d4TkmwYPTpSWT49/O8sYTSH8QF7bmAiAQedNpHRsXveR3/7xY9dhBQUajULjURMfFkkqmAIYZhg=="}]},"maintainers":[{"name":"1999","email":"info@staypositive.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scheduler-0.0.5.tgz_1509783758820_0.261672112159431"},"directories":{}},"0.0.6":{"name":"@1999/scheduler","version":"0.0.6","description":"Node.js library for periodical tasks","config":{"access":"public"},"main":"dist/index.js","jsnext:main":"dist/index.js","types":"dist/index.d.ts","engines":{"npm":">=5","node":">=8"},"files":["dist","src"],"scripts":{"build":"rm -fr dist/ && ./node_modules/.bin/tsc","lint":"tslint  -p . -c tslint.json 'src/**/*.ts'","prepublishOnly":"npm run build","test:unit":"mocha --reporter spec --require ts-node/register --slow 10000 --timeout 10000 'src/**/*-spec.ts'","test":"npm run lint && npm run test:unit"},"repository":{"type":"git","url":"git+https://github.com/1999/scheduler.git"},"author":{"name":"Dmitrii Sorin","email":"info@staypositive.ru"},"license":"MIT","bugs":{"url":"https://github.com/1999/scheduler/issues"},"homepage":"https://github.com/1999/scheduler","dependencies":{"debug":"^3.1.0","ts-node":"^3.3.0","typescript":"^2.5.3","uuid":"^3.1.0"},"devDependencies":{"@types/debug":"0.0.30","@types/mocha":"^2.2.44","@types/node":"^8.0.47","@types/sinon":"^2.3.7","@types/uuid":"^3.4.3","mocha":"^4.0.1","sinon":"^4.0.2","tslint":"^5.8.0"},"gitHead":"084f6b9db2ba4d983d25a7c9ce3f3fda1267ad18","_id":"@1999/scheduler@0.0.6","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"1999","email":"info@staypositive.ru"},"dist":{"integrity":"sha512-MgaqT/GEK1ek2/d8TRHLGxiMoMYBvF3ddsHaSjTCpUbSrWH3EoYkEzdyVLcqOCYn1IzcWjV0emMA39mkitjV8w==","shasum":"f8835b032cfc1a9bfa9eb9f55cbc7e0f6d03ab6f","tarball":"https://registry.npmjs.org/@1999/scheduler/-/scheduler-0.0.6.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICeyGKmg02EvxgR9jqPleTK/ngFe2N5nBgx7UM+j6wOEAiEAhjTKusrJVtqfEFW8JkdOQRdp3MslOyVOy240Y5x3WDI="}]},"maintainers":[{"name":"1999","email":"info@staypositive.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scheduler-0.0.6.tgz_1511693968388_0.9690608172677457"},"directories":{}},"0.0.7":{"name":"@1999/scheduler","version":"0.0.7","description":"Node.js library for periodical tasks","config":{"access":"public"},"main":"dist/index.js","jsnext:main":"dist/index.js","types":"dist/index.d.ts","engines":{"npm":">=5","node":">=8"},"files":["dist","src"],"scripts":{"build":"rm -fr dist/ && ./node_modules/.bin/tsc","lint":"tslint  -p . -c tslint.json 'src/**/*.ts'","prepublishOnly":"npm run build","test:unit":"mocha --reporter spec --require ts-node/register --slow 10000 --timeout 10000 'src/**/*-spec.ts'","test":"npm run lint && npm run test:unit"},"repository":{"type":"git","url":"git+https://github.com/1999/scheduler.git"},"author":{"name":"Dmitrii Sorin","email":"info@staypositive.ru"},"license":"MIT","bugs":{"url":"https://github.com/1999/scheduler/issues"},"homepage":"https://github.com/1999/scheduler","dependencies":{"debug":"^3.1.0","ts-node":"^3.3.0","typescript":"^2.5.3","uuid":"^3.1.0"},"devDependencies":{"@types/debug":"0.0.30","@types/mocha":"^2.2.44","@types/node":"^8.0.47","@types/sinon":"^2.3.7","@types/uuid":"^3.4.3","mocha":"^4.0.1","sinon":"^4.0.2","tslint":"^5.8.0"},"gitHead":"92c3733cf32a458dcf8cf150a31d47ee89f675a8","_id":"@1999/scheduler@0.0.7","_npmVersion":"5.5.1","_nodeVersion":"8.9.3","_npmUser":{"name":"1999","email":"info@staypositive.ru"},"dist":{"integrity":"sha512-32rIYqPU63YvzLZrUivcJsk46CZOnOdhQaeeIoeNcEfVpMuRiLicJxRlVjszoQajx0mPlKrtmKuFSX8GWlChUA==","shasum":"345b8b5cd6fdf66cc7ffd860e61fd948ccb901e9","tarball":"https://registry.npmjs.org/@1999/scheduler/-/scheduler-0.0.7.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGTODRJQ3tRzqbWXG/6Ok9Xh4o752K6Dz9X6Np4sUOOqAiEAnoavF22aF9uaJAnVQyHkPu98uGxLuRoDebKNTYPXGNs="}]},"maintainers":[{"name":"1999","email":"info@staypositive.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scheduler-0.0.7.tgz_1514621438443_0.5041014449670911"},"directories":{}},"0.0.8":{"name":"@1999/scheduler","version":"0.0.8","description":"Node.js library for periodical tasks","config":{"access":"public"},"main":"dist/index.js","jsnext:main":"dist/index.js","types":"dist/index.d.ts","engines":{"npm":">=5","node":">=8"},"files":["dist","src"],"scripts":{"build":"rm -fr dist/ && ./node_modules/.bin/tsc","lint":"tslint  -p . -c tslint.json 'src/**/*.ts'","prepublishOnly":"npm run build","test:unit":"mocha --reporter spec --require ts-node/register --slow 10000 --timeout 10000 'src/**/*-spec.ts'","test":"npm run lint && npm run test:unit"},"repository":{"type":"git","url":"git+https://github.com/1999/scheduler.git"},"author":{"name":"Dmitrii Sorin","email":"info@staypositive.ru"},"license":"MIT","bugs":{"url":"https://github.com/1999/scheduler/issues"},"homepage":"https://github.com/1999/scheduler","dependencies":{"debug":"^3.1.0","ts-node":"^3.3.0","typescript":"^2.5.3","uuid":"^3.1.0"},"devDependencies":{"@types/debug":"0.0.30","@types/mocha":"^2.2.44","@types/node":"^8.0.47","@types/sinon":"^2.3.7","@types/uuid":"^3.4.3","mocha":"^4.0.1","sinon":"^4.0.2","tslint":"^5.8.0"},"gitHead":"ab1095b42e988f8ef53dd7a00c519c174898222a","_id":"@1999/scheduler@0.0.8","_npmVersion":"5.5.1","_nodeVersion":"8.9.3","_npmUser":{"name":"1999","email":"info@staypositive.ru"},"dist":{"integrity":"sha512-hGWXdP5AM+RjnePYvOsjbrPuW1D13zWwJ1m+js6DwGpQo/pTg3RPLgvjyflZb8gK2WJdxqP8QglH7ecGiB6YOQ==","shasum":"391c8be6656ca45638ae4233d52eab8bc1850aa3","tarball":"https://registry.npmjs.org/@1999/scheduler/-/scheduler-0.0.8.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHP+PIXYjk14Vh7lK0ZvCrVnPYfxELyXcMOf1Ss9ElZQIhANUNe1VTqTXI8aaEtXAhY4pCmWDtHG3NoLQgHJksxxk5"}]},"maintainers":[{"name":"1999","email":"info@staypositive.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scheduler-0.0.8.tgz_1514887041346_0.1566716020461172"},"directories":{}},"0.0.9":{"name":"@1999/scheduler","version":"0.0.9","description":"Node.js library for periodical tasks","config":{"access":"public"},"main":"dist/index.js","jsnext:main":"dist/index.js","types":"dist/index.d.ts","engines":{"npm":">=5","node":">=8"},"files":["dist","src"],"scripts":{"build":"rm -fr dist/ && ./node_modules/.bin/tsc","lint":"tslint  -p . -c tslint.json 'src/**/*.ts'","prepublishOnly":"npm run build","test:unit":"mocha --reporter spec --require ts-node/register --slow 10000 --timeout 10000 'src/**/*-spec.ts'","test":"npm run lint && npm run test:unit"},"repository":{"type":"git","url":"git+https://github.com/1999/scheduler.git"},"author":{"name":"Dmitrii Sorin","email":"info@staypositive.ru"},"license":"MIT","bugs":{"url":"https://github.com/1999/scheduler/issues"},"homepage":"https://github.com/1999/scheduler","dependencies":{"debug":"^3.1.0","uuid":"^3.2.1"},"devDependencies":{"@types/debug":"0.0.30","@types/mocha":"^2.2.48","@types/node":"^8.9.5","@types/sinon":"^4.3.0","@types/uuid":"^3.4.3","mocha":"^5.0.4","sinon":"^4.4.3","ts-node":"^5.0.1","tslint":"^5.9.1","typescript":"^2.7.2"},"gitHead":"a67e1c204f20289300a8288149beef280d6107fe","_id":"@1999/scheduler@0.0.9","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"1999","email":"info@staypositive.ru"},"dist":{"integrity":"sha512-T869LJP+aETRrhd+ELvoECSJoX8lvxIXxUOAh62fNK9r/gGo95Q7G5r6vwf7Hv7jX3cz5XdJvPZwAkTu7w52Lw==","shasum":"003765e01abf9e0079ccc0de27947d9b3486c3d8","tarball":"https://registry.npmjs.org/@1999/scheduler/-/scheduler-0.0.9.tgz","fileCount":19,"unpackedSize":92387,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDFLjDy56kf+5Su74crIZjXEIHxk+wITFyTQbb/pW2IYgIgEIYQrncXr59qA2ia4sJ2BQc9TaJob6kPRKEVEIySl70="}]},"maintainers":[{"name":"1999","email":"info@staypositive.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scheduler_0.0.9_1520854919428_0.6156324111390672"},"_hasShrinkwrap":false}},"readme":"# Scheduler\n\n![Build Status](https://img.shields.io/travis/1999/scheduler/master.svg)\n![Dependency Status](http://img.shields.io/david/1999/scheduler/master.svg)\n![DevDependency Status](http://img.shields.io/david/dev/1999/scheduler/master.svg)\n\nNode.js library for periodical tasks written in Typescript.\n\n## How to install\n\n`npm install @1999/scheduler --save`\n\n## API\n\nThe only concept of scheduler is a `Task` which represents a periodically run task. It should be a callback which should return a Promise.\n\n### Simple tasks\n\nUse `scheduler.addTask(task: Task, period: number)` function to set up task period.\n\n```typescript\nimport {\n  default as Scheduler,\n  Task,\n} from '@1999/scheduler';\n\nconst task: Task = () => Promise.resolve(2);\nconst scheduler = new Scheduler();\nscheduler.addTask(task, 1000);\n\nscheduler.start();\n```\n\n### Named tasks\n\nIn this case you can pass task groups in scheduler constructor. Then use `scheduler.addTask(task: Task, periodId: string)` function to assign task to task group.\n\n```typescript\nimport {\n  default as Scheduler,\n  Task,\n} from '@1999/scheduler';\n\nconst task1: Task = () => got('https://api.facebook/id/1');\nconst task2: Task = () => got('https://api.facebook/id/2');\n\nconst scheduler = new Scheduler({ api: 1000 });\nscheduler.addTask(task1, 'api');\nscheduler.addTask(task2, 'api');\n\nscheduler.start();\n```\n\n## When period should depend on task execution\n\nSometimes it's not enough to have execution periodicity for tasks. For instance when you have an API which allows you to make requests once per N seconds: in this case it can be safer to send next request only N seconds after you get the response from the previous request. For this purpose you can use `Marker` callback which is the only argument for `Task`:\n\n```typescript\nimport {\n  default as Scheduler,\n  Marker,\n  Task,\n} from '@1999/scheduler';\n\nconst task: Task = (marker: Marker) => {\n  return got('https://api.facebook/id/1').then(() => {\n    // you can run marker function anywhere inside your task\n    // and the period pause will be started from this moment\n    marker();\n  });\n};\n\nconst scheduler = new Scheduler();\nscheduler.addTask(task);\nscheduler.start();\n```\n\n### Events\n\nScheduler instance extends node.js [EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter). You can use it to subscribe to events happening inside Scheduler instance:\n\n * `taskCompleted` - emits when task is successfully finished. Also emits an object `{ name: string, execTime: number }` where runTime is the task execution time in milliseconds.\n * `taskFailed` - emits when task execution fails. Also emits an object `{ err: Error, execTime: number, name: string }`\n","maintainers":[{"name":"1999","email":"info@staypositive.ru"}],"time":{"modified":"2022-04-04T10:32:27.176Z","created":"2017-10-29T13:08:14.577Z","0.0.1":"2017-10-29T13:08:14.577Z","0.0.2":"2017-10-29T13:11:10.363Z","0.0.3":"2017-10-29T20:27:56.961Z","0.0.4":"2017-10-29T20:29:27.297Z","0.0.5":"2017-11-04T08:22:38.968Z","0.0.6":"2017-11-26T10:59:28.545Z","0.0.7":"2017-12-30T08:10:38.609Z","0.0.8":"2018-01-02T09:57:21.454Z","0.0.9":"2018-03-12T11:41:59.543Z"},"homepage":"https://github.com/1999/scheduler","repository":{"type":"git","url":"git+https://github.com/1999/scheduler.git"},"author":{"name":"Dmitrii Sorin","email":"info@staypositive.ru"},"bugs":{"url":"https://github.com/1999/scheduler/issues"},"license":"MIT","readmeFilename":"README.md"}