@@ -260,7 +260,7 @@ addCronJob(name: string, seconds: string) {
260
260
this .logger .warn (` time (${seconds }) for job ${name } to run! ` );
261
261
});
262
262
263
- this .scheduler .addCronJob (name , job );
263
+ this .schedulerRegistry .addCronJob (name , job );
264
264
job .start ();
265
265
266
266
this .logger .warn (
@@ -277,7 +277,7 @@ In this code, we use the `CronJob` object from the `cron` package to create the
277
277
278
278
``` typescript
279
279
deleteCron (name : string ) {
280
- this .scheduler .deleteCronJob (name );
280
+ this .schedulerRegistry .deleteCronJob (name );
281
281
this .logger .warn (` job ${name } deleted! ` );
282
282
}
283
283
```
@@ -286,7 +286,7 @@ deleteCron(name: string) {
286
286
287
287
``` typescript
288
288
getCrons () {
289
- const jobs = this .scheduler .getCronJobs ();
289
+ const jobs = this .schedulerRegistry .getCronJobs ();
290
290
jobs .forEach ((value , key , map ) => {
291
291
let next;
292
292
try {
@@ -325,7 +325,7 @@ addInterval(name: string, milliseconds: number) {
325
325
};
326
326
327
327
const interval = setInterval (callback , milliseconds );
328
- this .scheduler .addInterval (name , interval );
328
+ this .schedulerRegistry .addInterval (name , interval );
329
329
}
330
330
```
331
331
@@ -336,7 +336,7 @@ That method takes two arguments: a name for the interval, and the interval itsel
336
336
337
337
``` typescript
338
338
deleteInterval (name : string ) {
339
- this .scheduler .deleteInterval (name );
339
+ this .schedulerRegistry .deleteInterval (name );
340
340
this .logger .warn (` Interval ${name } deleted! ` );
341
341
}
342
342
```
@@ -345,7 +345,7 @@ deleteInterval(name: string) {
345
345
346
346
``` typescript
347
347
getIntervals () {
348
- const intervals = this .scheduler .getIntervals ();
348
+ const intervals = this .schedulerRegistry .getIntervals ();
349
349
intervals .forEach (key => this .logger .log (` Interval: ${key } ` ));
350
350
}
351
351
```
@@ -374,7 +374,7 @@ addTimeout(name: string, milliseconds: number) {
374
374
};
375
375
376
376
const timeout = setTimeout (callback , milliseconds );
377
- this .scheduler .addTimeout (name , timeout );
377
+ this .schedulerRegistry .addTimeout (name , timeout );
378
378
}
379
379
```
380
380
@@ -385,7 +385,7 @@ That method takes two arguments: a name for the timeout, and the timeout itself.
385
385
386
386
``` typescript
387
387
deleteTimeout (name : string ) {
388
- this .scheduler .deleteTimeout (name );
388
+ this .schedulerRegistry .deleteTimeout (name );
389
389
this .logger .warn (` Timeout ${name } deleted! ` );
390
390
}
391
391
```
@@ -394,7 +394,7 @@ deleteTimeout(name: string) {
394
394
395
395
``` typescript
396
396
getTimeouts () {
397
- const timeouts = this .scheduler .getTimeouts ();
397
+ const timeouts = this .schedulerRegistry .getTimeouts ();
398
398
timeouts .forEach (key => this .logger .log (` Timeout: ${key } ` ));
399
399
}
400
400
```
0 commit comments