We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de6d38a commit 1f0b90cCopy full SHA for 1f0b90c
scripts/analytics/src/libs/modules/task-scheduler/base-task-scheduler.module.ts
@@ -16,9 +16,13 @@ class BaseTaskScheduler implements TaskScheduler {
16
}
17
18
public start(schedule: string, task: () => void): void {
19
- cron.schedule(schedule, () => {
20
- task();
21
- });
+ cron.schedule(
+ schedule,
+ () => {
22
+ task();
23
+ },
24
+ { runOnInit: true },
25
+ );
26
this.logger.info(
27
`Task is scheduled to run according to the pattern: ${schedule}.`,
28
);
0 commit comments