Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
f91fa33568 | |||
c234cb4caa |
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smarttime",
|
"name": "@pushrocks/smarttime",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "4.0.0",
|
"version": "4.0.1",
|
||||||
"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",
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@pushrocks/smarttime',
|
name: '@pushrocks/smarttime',
|
||||||
version: '4.0.0',
|
version: '4.0.1',
|
||||||
description: 'handle time in smart ways'
|
description: 'handle time in smart ways'
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import * as plugins from './smarttime.plugins.js';
|
import * as plugins from './smarttime.plugins.js';
|
||||||
import { CronJob } from './smarttime.classes.cronjob.js';
|
import { CronJob, TJobFunction } from './smarttime.classes.cronjob.js';
|
||||||
import { getMilliSecondsAsHumanReadableString } from './smarttime.units.js';
|
import { getMilliSecondsAsHumanReadableString } from './smarttime.units.js';
|
||||||
|
|
||||||
export class CronManager {
|
export class CronManager {
|
||||||
@ -10,7 +10,7 @@ export class CronManager {
|
|||||||
|
|
||||||
constructor() {}
|
constructor() {}
|
||||||
|
|
||||||
public addCronjob(cronIdentifierArg: string, cronFunctionArg: () => Promise<void>) {
|
public addCronjob(cronIdentifierArg: string, cronFunctionArg: TJobFunction) {
|
||||||
const newCronJob = new CronJob(this, cronIdentifierArg, cronFunctionArg);
|
const newCronJob = new CronJob(this, cronIdentifierArg, cronFunctionArg);
|
||||||
this.cronjobs.add(newCronJob);
|
this.cronjobs.add(newCronJob);
|
||||||
if (this.status === 'started') {
|
if (this.status === 'started') {
|
||||||
|
Reference in New Issue
Block a user