Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
da9c71eedb | |||
63405fc577 | |||
d789eec558 | |||
22027d2308 | |||
87d29fbb50 | |||
1c5a1c21da |
17383
package-lock.json
generated
17383
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
26
package.json
26
package.json
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smarttime",
|
"name": "@pushrocks/smarttime",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "3.0.39",
|
"version": "3.0.42",
|
||||||
"description": "handle time in smart ways",
|
"description": "handle time in smart ways",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
"typings": "dist_ts/index.d.ts",
|
"typings": "dist_ts/index.d.ts",
|
||||||
@ -12,22 +12,22 @@
|
|||||||
"build": "(tsbuild --web && tsbundle npm)"
|
"build": "(tsbuild --web && tsbundle npm)"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.25",
|
"@gitzone/tsbuild": "^2.1.28",
|
||||||
"@gitzone/tsbundle": "^1.0.78",
|
"@gitzone/tsbundle": "^1.0.88",
|
||||||
"@gitzone/tsrun": "^1.2.12",
|
"@gitzone/tsrun": "^1.2.18",
|
||||||
"@gitzone/tstest": "^1.0.52",
|
"@gitzone/tstest": "^1.0.60",
|
||||||
"@pushrocks/tapbundle": "^3.2.9",
|
"@pushrocks/tapbundle": "^3.2.14",
|
||||||
"@types/node": "^14.11.2",
|
"@types/node": "^16.11.6",
|
||||||
"tslint": "^6.1.3",
|
"tslint": "^6.1.3",
|
||||||
"tslint-config-prettier": "^1.18.0"
|
"tslint-config-prettier": "^1.18.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/lik": "^4.0.17",
|
"@pushrocks/lik": "^5.0.0",
|
||||||
"@pushrocks/smartdelay": "^2.0.10",
|
"@pushrocks/smartdelay": "^2.0.13",
|
||||||
"@pushrocks/smartpromise": "^3.0.2",
|
"@pushrocks/smartpromise": "^3.1.6",
|
||||||
"croner": "^1.1.23",
|
"croner": "^4.0.69",
|
||||||
"dayjs": "^1.9.1",
|
"dayjs": "^1.10.7",
|
||||||
"is-nan": "^1.3.0",
|
"is-nan": "^1.3.2",
|
||||||
"pretty-ms": "^7.0.1"
|
"pretty-ms": "^7.0.1"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
@ -36,7 +36,7 @@ This class provides scheduling of functions with a cron syntax
|
|||||||
```typescript
|
```typescript
|
||||||
import { CronManager } from '@pushrocks/smarrtime';
|
import { CronManager } from '@pushrocks/smarrtime';
|
||||||
const cronManagerInstance = new CronManager();
|
const cronManagerInstance = new CronManager();
|
||||||
cronManagerInstance.addConrjob('* * * * * *', async () => {
|
cronManagerInstance.addCronjob('* * * * * *', async () => {
|
||||||
console.log('hello'); // will log 'hello' to console once every second;
|
console.log('hello'); // will log 'hello' to console once every second;
|
||||||
});
|
});
|
||||||
cronManagerInstance.start();
|
cronManagerInstance.start();
|
||||||
|
@ -18,7 +18,7 @@ export class CronParser {
|
|||||||
}
|
}
|
||||||
if (cronPart.includes('/')) {
|
if (cronPart.includes('/')) {
|
||||||
const every = parseInt(cronPart.split('/')[1], 10);
|
const every = parseInt(cronPart.split('/')[1], 10);
|
||||||
const findEvenMatch = (recursionStartArg: number) => {
|
const findEvenMatch = (recursionStartArg: number): number => {
|
||||||
if (recursionStartArg % every === 0) {
|
if (recursionStartArg % every === 0) {
|
||||||
return recursionStartArg;
|
return recursionStartArg;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user