Skip to content

Commit 200d477

Browse files
Update task-scheduling.md
1 parent 618e1ee commit 200d477

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/techniques/task-scheduling.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@ import { Cron, CronExpression } from '@nestjs/schedule';
110110
export class TasksService {
111111
private readonly logger = new Logger(TasksService.name);
112112

113-
@Cron(CronExpression.EVERY_45_SECONDS)
113+
@Cron(CronExpression.EVERY_30_SECONDS)
114114
handleCron() {
115-
this.logger.debug('Called every 45 seconds');
115+
this.logger.debug('Called every 30 seconds');
116116
}
117117
}
118118
```
119119

120-
In this example, the `handleCron()` method will be called every `45` seconds.
120+
In this example, the `handleCron()` method will be called every `30` seconds.
121121

122122
Alternatively, you can supply a JavaScript `Date` object to the `@Cron()` decorator. Doing so causes the job to execute exactly once, at the specified date.
123123

0 commit comments

Comments
 (0)