@navios/schedule 0.9.0 → 1.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/src/legacy-compat/decorators/cron.decorator.d.mts +31 -0
  3. package/dist/src/legacy-compat/decorators/cron.decorator.d.mts.map +1 -0
  4. package/dist/src/legacy-compat/decorators/index.d.mts +3 -0
  5. package/dist/src/legacy-compat/decorators/index.d.mts.map +1 -0
  6. package/dist/src/legacy-compat/decorators/schedulable.decorator.d.mts +36 -0
  7. package/dist/src/legacy-compat/decorators/schedulable.decorator.d.mts.map +1 -0
  8. package/dist/src/legacy-compat/index.d.mts +26 -0
  9. package/dist/src/legacy-compat/index.d.mts.map +1 -0
  10. package/dist/tsconfig.tsbuildinfo +1 -1
  11. package/lib/index.cjs +12 -620
  12. package/lib/index.d.cts +2 -232
  13. package/lib/index.d.cts.map +1 -1
  14. package/lib/index.d.mts +2 -232
  15. package/lib/index.d.mts.map +1 -1
  16. package/lib/index.mjs +2 -610
  17. package/lib/legacy-compat/index.cjs +98 -0
  18. package/lib/legacy-compat/index.cjs.map +1 -0
  19. package/lib/legacy-compat/index.d.cts +73 -0
  20. package/lib/legacy-compat/index.d.cts.map +1 -0
  21. package/lib/legacy-compat/index.d.mts +73 -0
  22. package/lib/legacy-compat/index.d.mts.map +1 -0
  23. package/lib/legacy-compat/index.mjs +73 -0
  24. package/lib/legacy-compat/index.mjs.map +1 -0
  25. package/lib/scheduler.service-BinyHmuL.cjs +676 -0
  26. package/lib/scheduler.service-BinyHmuL.cjs.map +1 -0
  27. package/lib/scheduler.service-Ccvw4fsy.d.cts +236 -0
  28. package/lib/scheduler.service-Ccvw4fsy.d.cts.map +1 -0
  29. package/lib/scheduler.service-DkyiR8iY.mjs +611 -0
  30. package/lib/scheduler.service-DkyiR8iY.mjs.map +1 -0
  31. package/lib/scheduler.service-pFh29qTy.d.mts +236 -0
  32. package/lib/scheduler.service-pFh29qTy.d.mts.map +1 -0
  33. package/package.json +13 -3
  34. package/src/legacy-compat/decorators/cron.decorator.mts +58 -0
  35. package/src/legacy-compat/decorators/index.mts +2 -0
  36. package/src/legacy-compat/decorators/schedulable.decorator.mts +47 -0
  37. package/src/legacy-compat/index.mts +41 -0
  38. package/tsdown.config.mts +1 -1
  39. package/lib/index.cjs.map +0 -1
  40. package/lib/index.mjs.map +0 -1
package/lib/index.d.cts CHANGED
@@ -1,62 +1,8 @@
1
- import { CronJob, CronJobParams } from "cron";
1
+ import { a as extractScheduleMetadata, c as CronMetadata, d as getCronMetadata, f as Cron, i as ScheduleMetadataKey, l as CronMetadataKey, n as Schedule, o as getScheduleMetadata, p as CronOptions, r as ScheduleMetadata, s as hasScheduleMetadata, t as SchedulerService, u as getAllCronMetadata } from "./scheduler.service-Ccvw4fsy.cjs";
2
2
  import { ClassType, Registry } from "@navios/core";
3
3
 
4
- //#region src/decorators/cron.decorator.d.mts
5
-
6
- /**
7
- * Options for configuring a cron job.
8
- *
9
- * @public
10
- */
11
- interface CronOptions {
12
- /**
13
- * Whether the job should be disabled by default.
14
- * Disabled jobs won't start automatically but can be manually started later.
15
- *
16
- * @default false
17
- */
18
- disabled?: boolean;
19
- }
20
- /**
21
- * Decorator that marks a method to run on a cron schedule.
22
- *
23
- * The method must be in a class decorated with `@Schedulable()`.
24
- * The method will be automatically executed according to the provided cron expression.
25
- *
26
- * @param cronTime - Cron expression (5 or 6 fields) or a pre-defined Schedule constant
27
- * @param options - Optional configuration for the cron job
28
- *
29
- * @example
30
- * ```typescript
31
- * @Schedulable()
32
- * class TaskService {
33
- * // Run daily at midnight
34
- * @Cron('0 0 * * *')
35
- * async dailyTask() {
36
- * console.log('Running daily task')
37
- * }
38
- *
39
- * // Use pre-defined schedule
40
- * @Cron(Schedule.EveryFiveMinutes)
41
- * async frequentTask() {
42
- * console.log('Running every 5 minutes')
43
- * }
44
- *
45
- * // Disabled job (won't start automatically)
46
- * @Cron('0 2 * * *', { disabled: true })
47
- * async maintenanceTask() {
48
- * console.log('Maintenance task')
49
- * }
50
- * }
51
- * ```
52
- *
53
- * @throws {Error} If applied to something other than a method
54
- *
55
- * @public
56
- */
57
- declare function Cron(cronTime: CronJobParams['cronTime'], options?: CronOptions): (target: () => Promise<void>, context: ClassMethodDecoratorContext) => () => Promise<void>;
58
- //#endregion
59
4
  //#region src/decorators/schedulable.decorator.d.mts
5
+
60
6
  /**
61
7
  * Decorator that marks a class as schedulable and makes it injectable.
62
8
  *
@@ -88,181 +34,5 @@ declare function Schedulable({
88
34
  registry?: Registry;
89
35
  }): (target: ClassType, context: ClassDecoratorContext) => ClassType;
90
36
  //#endregion
91
- //#region src/metadata/cron.metadata.d.mts
92
- declare const CronMetadataKey: unique symbol;
93
- interface CronMetadata {
94
- classMethod: string;
95
- cronTime: CronJobParams['cronTime'] | null;
96
- disabled: boolean;
97
- }
98
- declare function getAllCronMetadata(context: ClassMethodDecoratorContext | ClassDecoratorContext): Set<CronMetadata>;
99
- declare function getCronMetadata(target: Function, context: ClassMethodDecoratorContext): CronMetadata;
100
- //#endregion
101
- //#region src/metadata/schedule.metadata.d.mts
102
- declare const ScheduleMetadataKey: unique symbol;
103
- interface ScheduleMetadata {
104
- name: string;
105
- jobs: Set<CronMetadata>;
106
- }
107
- declare function getScheduleMetadata(target: ClassType, context: ClassDecoratorContext): ScheduleMetadata;
108
- declare function extractScheduleMetadata(target: ClassType): ScheduleMetadata;
109
- declare function hasScheduleMetadata(target: ClassType): boolean;
110
- //#endregion
111
- //#region src/cron.constants.d.mts
112
- /**
113
- * Pre-defined cron schedule constants for common scheduling patterns.
114
- *
115
- * These constants provide convenient shortcuts for frequently used cron expressions,
116
- * making it easier to schedule jobs without manually writing cron expressions.
117
- *
118
- * @example
119
- * ```typescript
120
- * import { Schedule } from '@navios/schedule'
121
- *
122
- * @Schedulable()
123
- * class TaskService {
124
- * @Cron(Schedule.EveryMinute)
125
- * async everyMinute() {}
126
- *
127
- * @Cron(Schedule.EveryHour)
128
- * async hourly() {}
129
- *
130
- * @Cron(Schedule.EveryDay)
131
- * async daily() {}
132
- * }
133
- * ```
134
- *
135
- * @public
136
- */
137
- declare enum Schedule {
138
- EveryMinute = "*/1 * * * *",
139
- EveryFiveMinutes = "*/5 * * * *",
140
- EveryTenMinutes = "*/10 * * * *",
141
- EveryFifteenMinutes = "*/15 * * * *",
142
- EveryThirtyMinutes = "*/30 * * * *",
143
- EveryHour = "0 * * * *",
144
- EveryTwoHours = "0 */2 * * *",
145
- EveryThreeHours = "0 */3 * * *",
146
- EveryFourHours = "0 */4 * * *",
147
- EverySixHours = "0 */6 * * *",
148
- EveryTwelveHours = "0 */12 * * *",
149
- EveryDay = "0 0 * * *",
150
- EveryWeek = "0 0 * * 0",
151
- EveryMonth = "0 0 1 * *",
152
- }
153
- //#endregion
154
- //#region src/scheduler.service.d.mts
155
- /**
156
- * Service responsible for managing and executing scheduled cron jobs.
157
- *
158
- * The SchedulerService registers schedulable services decorated with `@Schedulable()`
159
- * and automatically starts their cron jobs based on the `@Cron()` decorator configuration.
160
- *
161
- * @example
162
- * ```typescript
163
- * import { inject, Injectable } from '@navios/core'
164
- * import { SchedulerService } from '@navios/schedule'
165
- *
166
- * @Injectable()
167
- * class AppModule {
168
- * private readonly scheduler = inject(SchedulerService)
169
- *
170
- * async onModuleInit() {
171
- * this.scheduler.register(MySchedulableService)
172
- * }
173
- * }
174
- * ```
175
- *
176
- * @public
177
- */
178
- declare class SchedulerService {
179
- private readonly logger;
180
- private readonly container;
181
- private readonly jobs;
182
- /**
183
- * Registers a schedulable service and starts all its cron jobs.
184
- *
185
- * The service must be decorated with `@Schedulable()` and contain methods
186
- * decorated with `@Cron()` to be registered successfully.
187
- *
188
- * @param service - The schedulable service class to register
189
- * @throws {Error} If the service is not decorated with `@Schedulable()`
190
- *
191
- * @example
192
- * ```typescript
193
- * @Schedulable()
194
- * class TaskService {
195
- * @Cron('0 0 * * *')
196
- * async dailyTask() {
197
- * // Runs daily at midnight
198
- * }
199
- * }
200
- *
201
- * schedulerService.register(TaskService)
202
- * ```
203
- *
204
- * @public
205
- */
206
- register(service: ClassType): void;
207
- /**
208
- * Retrieves a specific cron job instance for a method in a schedulable service.
209
- *
210
- * @param service - The schedulable service class
211
- * @param method - The name of the method decorated with `@Cron()`
212
- * @returns The CronJob instance if found, undefined otherwise
213
- *
214
- * @example
215
- * ```typescript
216
- * const job = schedulerService.getJob(TaskService, 'dailyTask')
217
- * if (job) {
218
- * console.log('Job is active:', job.isActive)
219
- * job.start() // Manually start the job
220
- * job.stop() // Manually stop the job
221
- * }
222
- * ```
223
- *
224
- * @public
225
- */
226
- getJob<T extends ClassType>(service: T, method: keyof InstanceType<T>): CronJob | undefined;
227
- private registerJobs;
228
- /**
229
- * Starts all registered cron jobs that are currently inactive.
230
- *
231
- * Only jobs that are not already active will be started. This method
232
- * is useful for resuming all jobs after calling `stopAll()`.
233
- *
234
- * @example
235
- * ```typescript
236
- * // Stop all jobs
237
- * schedulerService.stopAll()
238
- *
239
- * // Later, resume all jobs
240
- * schedulerService.startAll()
241
- * ```
242
- *
243
- * @public
244
- */
245
- startAll(): void;
246
- /**
247
- * Stops all registered cron jobs that are currently active.
248
- *
249
- * Only jobs that are currently active will be stopped. This method
250
- * is useful for pausing all scheduled tasks, for example during
251
- * application shutdown or maintenance.
252
- *
253
- * @example
254
- * ```typescript
255
- * // Pause all scheduled jobs
256
- * schedulerService.stopAll()
257
- *
258
- * // Jobs can be resumed later with startAll()
259
- * schedulerService.startAll()
260
- * ```
261
- *
262
- * @public
263
- */
264
- stopAll(): void;
265
- }
266
- //#endregion
267
37
  export { Cron, CronMetadata, CronMetadataKey, CronOptions, Schedulable, Schedule, ScheduleMetadata, ScheduleMetadataKey, SchedulerService, extractScheduleMetadata, getAllCronMetadata, getCronMetadata, getScheduleMetadata, hasScheduleMetadata };
268
38
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/decorators/cron.decorator.mts","../src/decorators/schedulable.decorator.mts","../src/metadata/cron.metadata.mts","../src/metadata/schedule.metadata.mts","../src/cron.constants.mts","../src/scheduler.service.mts"],"sourcesContent":[],"mappings":";;;;;;;;AASA;AA+CA;AACY,UAhDK,WAAA,CAgDL;EACA;;;;;;;;AC3BZ;;;;;;;;;;AC7BA;AAEA;AAMA;;;;;;AAiBA;;;;;;;;ACrBA;AAEA;AAKA;;;;;AAyBA;AAWA;;;iBHOgB,IAAA,WACJ,qCACA,6BAGM,wBACL,sCADK;;;;;AApDlB;AA+CA;;;;;;;;;;ACzBA;;;;;;;;;;AC7BA;AAEA;AAMgB,iBDqBA,WAAA,CCrBkB;EAAA;CACO,CADP,EAAA;EACvB,QAAA,CAAA,EDoB4C,QCpB5C;CAA8B,CAAA,EAAA,CAAA,MAAA,EDqBvB,SCrBuB,EAAA,OAAA,EDqBH,qBCrBG,EAAA,GDqBkB,SCrBlB;;;cAT5B;UAEI,YAAA;;EFKA,QAAA,EEHL,aFGgB,CAAA,UAAA,CAAA,GAAA,IAAA;EA+CZ,QAAI,EAAA,OAAA;;AAER,iBEhDI,kBAAA,CFgDJ,OAAA,EE/CD,2BF+CC,GE/C6B,qBF+C7B,CAAA,EE9CT,GF8CS,CE9CL,YF8CK,CAAA;AAGM,iBElCF,eAAA,CFkCE,MAAA,EEjCR,QFiCQ,EAAA,OAAA,EEhCP,2BFgCO,CAAA,EE/Bf,YF+Be;;;cGvDL;UAEI,gBAAA;EHCA,IAAA,EAAA,MAAA;EA+CD,IAAA,EG9CR,GH8CY,CG9CR,YH8CQ,CAAA;;AAER,iBG7CI,mBAAA,CH6CJ,MAAA,EG5CF,SH4CE,EAAA,OAAA,EG3CD,qBH2CC,CAAA,EG1CT,gBH0CS;AAGM,iBGvBF,uBAAA,CHuBE,MAAA,EGvB8B,SHuB9B,CAAA,EGvB0C,gBHuB1C;AACL,iBGbG,mBAAA,CHaH,MAAA,EGb+B,SHa/B,CAAA,EAAA,OAAA;;;;;;;AArDb;AA+CA;;;;;;;;;;ACzBA;;;;;;;;;;AC7Ba,aEuBD,QAAA;EFrBK,WAAA,GAAA,aAEL;EAII,gBAAA,GAAA,aAAkB;EACvB,eAAA,GAAA,cAAA;EAA8B,mBAAA,GAAA,cAAA;EAClC,kBAAA,GAAA,cAAA;EAAJ,SAAA,GAAA,WAAA;EAAG,aAAA,GAAA,aAAA;EAeU,eAAA,GAAe,aAAA;EACrB,cAAA,GAAA,aAAA;EACC,aAAA,GAAA,aAAA;EACR,gBAAA,GAAA,cAAA;EAAY,QAAA,GAAA,WAAA;;;;;;;;AFrBf;AA+CA;;;;;;;;;;ACzBA;;;;;;;;;;AC7Ba,cGmCA,gBAAA,CHnC2C;EAEvC,iBAAY,MAAA;EAMb,iBAAA,SAAkB;EACvB,iBAAA,IAAA;EAA8B;;;;AAgBzC;;;;;;;;ACrBA;AAEA;AAKA;;;;;AAyBA;AAWA;;;;ECxBY,QAAA,CAAA,OAAQ,EC2CA,SD3CA,CAAA,EAAA,IAAA;;;;ACWpB;;;;;;;;;;;;;;;;mBA8DmB,oBACN,iBACK,aAAa,KAC1B"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/decorators/schedulable.decorator.mts"],"sourcesContent":[],"mappings":";;;;;;;AA+BA;;;;;;;;;;;;;;;;;;;;;;;iBAAgB,WAAA;;;aAAuC;aACrC,oBAAoB,0BAAqB"}
package/lib/index.d.mts CHANGED
@@ -1,62 +1,8 @@
1
+ import { a as extractScheduleMetadata, c as CronMetadata, d as getCronMetadata, f as Cron, i as ScheduleMetadataKey, l as CronMetadataKey, n as Schedule, o as getScheduleMetadata, p as CronOptions, r as ScheduleMetadata, s as hasScheduleMetadata, t as SchedulerService, u as getAllCronMetadata } from "./scheduler.service-pFh29qTy.mjs";
1
2
  import { ClassType, Registry } from "@navios/core";
2
- import { CronJob, CronJobParams } from "cron";
3
3
 
4
- //#region src/decorators/cron.decorator.d.mts
5
-
6
- /**
7
- * Options for configuring a cron job.
8
- *
9
- * @public
10
- */
11
- interface CronOptions {
12
- /**
13
- * Whether the job should be disabled by default.
14
- * Disabled jobs won't start automatically but can be manually started later.
15
- *
16
- * @default false
17
- */
18
- disabled?: boolean;
19
- }
20
- /**
21
- * Decorator that marks a method to run on a cron schedule.
22
- *
23
- * The method must be in a class decorated with `@Schedulable()`.
24
- * The method will be automatically executed according to the provided cron expression.
25
- *
26
- * @param cronTime - Cron expression (5 or 6 fields) or a pre-defined Schedule constant
27
- * @param options - Optional configuration for the cron job
28
- *
29
- * @example
30
- * ```typescript
31
- * @Schedulable()
32
- * class TaskService {
33
- * // Run daily at midnight
34
- * @Cron('0 0 * * *')
35
- * async dailyTask() {
36
- * console.log('Running daily task')
37
- * }
38
- *
39
- * // Use pre-defined schedule
40
- * @Cron(Schedule.EveryFiveMinutes)
41
- * async frequentTask() {
42
- * console.log('Running every 5 minutes')
43
- * }
44
- *
45
- * // Disabled job (won't start automatically)
46
- * @Cron('0 2 * * *', { disabled: true })
47
- * async maintenanceTask() {
48
- * console.log('Maintenance task')
49
- * }
50
- * }
51
- * ```
52
- *
53
- * @throws {Error} If applied to something other than a method
54
- *
55
- * @public
56
- */
57
- declare function Cron(cronTime: CronJobParams['cronTime'], options?: CronOptions): (target: () => Promise<void>, context: ClassMethodDecoratorContext) => () => Promise<void>;
58
- //#endregion
59
4
  //#region src/decorators/schedulable.decorator.d.mts
5
+
60
6
  /**
61
7
  * Decorator that marks a class as schedulable and makes it injectable.
62
8
  *
@@ -88,181 +34,5 @@ declare function Schedulable({
88
34
  registry?: Registry;
89
35
  }): (target: ClassType, context: ClassDecoratorContext) => ClassType;
90
36
  //#endregion
91
- //#region src/metadata/cron.metadata.d.mts
92
- declare const CronMetadataKey: unique symbol;
93
- interface CronMetadata {
94
- classMethod: string;
95
- cronTime: CronJobParams['cronTime'] | null;
96
- disabled: boolean;
97
- }
98
- declare function getAllCronMetadata(context: ClassMethodDecoratorContext | ClassDecoratorContext): Set<CronMetadata>;
99
- declare function getCronMetadata(target: Function, context: ClassMethodDecoratorContext): CronMetadata;
100
- //#endregion
101
- //#region src/metadata/schedule.metadata.d.mts
102
- declare const ScheduleMetadataKey: unique symbol;
103
- interface ScheduleMetadata {
104
- name: string;
105
- jobs: Set<CronMetadata>;
106
- }
107
- declare function getScheduleMetadata(target: ClassType, context: ClassDecoratorContext): ScheduleMetadata;
108
- declare function extractScheduleMetadata(target: ClassType): ScheduleMetadata;
109
- declare function hasScheduleMetadata(target: ClassType): boolean;
110
- //#endregion
111
- //#region src/cron.constants.d.mts
112
- /**
113
- * Pre-defined cron schedule constants for common scheduling patterns.
114
- *
115
- * These constants provide convenient shortcuts for frequently used cron expressions,
116
- * making it easier to schedule jobs without manually writing cron expressions.
117
- *
118
- * @example
119
- * ```typescript
120
- * import { Schedule } from '@navios/schedule'
121
- *
122
- * @Schedulable()
123
- * class TaskService {
124
- * @Cron(Schedule.EveryMinute)
125
- * async everyMinute() {}
126
- *
127
- * @Cron(Schedule.EveryHour)
128
- * async hourly() {}
129
- *
130
- * @Cron(Schedule.EveryDay)
131
- * async daily() {}
132
- * }
133
- * ```
134
- *
135
- * @public
136
- */
137
- declare enum Schedule {
138
- EveryMinute = "*/1 * * * *",
139
- EveryFiveMinutes = "*/5 * * * *",
140
- EveryTenMinutes = "*/10 * * * *",
141
- EveryFifteenMinutes = "*/15 * * * *",
142
- EveryThirtyMinutes = "*/30 * * * *",
143
- EveryHour = "0 * * * *",
144
- EveryTwoHours = "0 */2 * * *",
145
- EveryThreeHours = "0 */3 * * *",
146
- EveryFourHours = "0 */4 * * *",
147
- EverySixHours = "0 */6 * * *",
148
- EveryTwelveHours = "0 */12 * * *",
149
- EveryDay = "0 0 * * *",
150
- EveryWeek = "0 0 * * 0",
151
- EveryMonth = "0 0 1 * *",
152
- }
153
- //#endregion
154
- //#region src/scheduler.service.d.mts
155
- /**
156
- * Service responsible for managing and executing scheduled cron jobs.
157
- *
158
- * The SchedulerService registers schedulable services decorated with `@Schedulable()`
159
- * and automatically starts their cron jobs based on the `@Cron()` decorator configuration.
160
- *
161
- * @example
162
- * ```typescript
163
- * import { inject, Injectable } from '@navios/core'
164
- * import { SchedulerService } from '@navios/schedule'
165
- *
166
- * @Injectable()
167
- * class AppModule {
168
- * private readonly scheduler = inject(SchedulerService)
169
- *
170
- * async onModuleInit() {
171
- * this.scheduler.register(MySchedulableService)
172
- * }
173
- * }
174
- * ```
175
- *
176
- * @public
177
- */
178
- declare class SchedulerService {
179
- private readonly logger;
180
- private readonly container;
181
- private readonly jobs;
182
- /**
183
- * Registers a schedulable service and starts all its cron jobs.
184
- *
185
- * The service must be decorated with `@Schedulable()` and contain methods
186
- * decorated with `@Cron()` to be registered successfully.
187
- *
188
- * @param service - The schedulable service class to register
189
- * @throws {Error} If the service is not decorated with `@Schedulable()`
190
- *
191
- * @example
192
- * ```typescript
193
- * @Schedulable()
194
- * class TaskService {
195
- * @Cron('0 0 * * *')
196
- * async dailyTask() {
197
- * // Runs daily at midnight
198
- * }
199
- * }
200
- *
201
- * schedulerService.register(TaskService)
202
- * ```
203
- *
204
- * @public
205
- */
206
- register(service: ClassType): void;
207
- /**
208
- * Retrieves a specific cron job instance for a method in a schedulable service.
209
- *
210
- * @param service - The schedulable service class
211
- * @param method - The name of the method decorated with `@Cron()`
212
- * @returns The CronJob instance if found, undefined otherwise
213
- *
214
- * @example
215
- * ```typescript
216
- * const job = schedulerService.getJob(TaskService, 'dailyTask')
217
- * if (job) {
218
- * console.log('Job is active:', job.isActive)
219
- * job.start() // Manually start the job
220
- * job.stop() // Manually stop the job
221
- * }
222
- * ```
223
- *
224
- * @public
225
- */
226
- getJob<T extends ClassType>(service: T, method: keyof InstanceType<T>): CronJob | undefined;
227
- private registerJobs;
228
- /**
229
- * Starts all registered cron jobs that are currently inactive.
230
- *
231
- * Only jobs that are not already active will be started. This method
232
- * is useful for resuming all jobs after calling `stopAll()`.
233
- *
234
- * @example
235
- * ```typescript
236
- * // Stop all jobs
237
- * schedulerService.stopAll()
238
- *
239
- * // Later, resume all jobs
240
- * schedulerService.startAll()
241
- * ```
242
- *
243
- * @public
244
- */
245
- startAll(): void;
246
- /**
247
- * Stops all registered cron jobs that are currently active.
248
- *
249
- * Only jobs that are currently active will be stopped. This method
250
- * is useful for pausing all scheduled tasks, for example during
251
- * application shutdown or maintenance.
252
- *
253
- * @example
254
- * ```typescript
255
- * // Pause all scheduled jobs
256
- * schedulerService.stopAll()
257
- *
258
- * // Jobs can be resumed later with startAll()
259
- * schedulerService.startAll()
260
- * ```
261
- *
262
- * @public
263
- */
264
- stopAll(): void;
265
- }
266
- //#endregion
267
37
  export { Cron, CronMetadata, CronMetadataKey, CronOptions, Schedulable, Schedule, ScheduleMetadata, ScheduleMetadataKey, SchedulerService, extractScheduleMetadata, getAllCronMetadata, getCronMetadata, getScheduleMetadata, hasScheduleMetadata };
268
38
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/decorators/cron.decorator.mts","../src/decorators/schedulable.decorator.mts","../src/metadata/cron.metadata.mts","../src/metadata/schedule.metadata.mts","../src/cron.constants.mts","../src/scheduler.service.mts"],"sourcesContent":[],"mappings":";;;;;;;;AASA;AA+CA;AACY,UAhDK,WAAA,CAgDL;EACA;;;;;;;;AC3BZ;;;;;;;;;;AC7BA;AAEA;AAMA;;;;;;AAiBA;;;;;;;;ACrBA;AAEA;AAKA;;;;;AAyBA;AAWA;;;iBHOgB,IAAA,WACJ,qCACA,6BAGM,wBACL,sCADK;;;;;AApDlB;AA+CA;;;;;;;;;;ACzBA;;;;;;;;;;AC7BA;AAEA;AAMgB,iBDqBA,WAAA,CCrBkB;EAAA;CACO,CADP,EAAA;EACvB,QAAA,CAAA,EDoB4C,QCpB5C;CAA8B,CAAA,EAAA,CAAA,MAAA,EDqBvB,SCrBuB,EAAA,OAAA,EDqBH,qBCrBG,EAAA,GDqBkB,SCrBlB;;;cAT5B;UAEI,YAAA;;EFKA,QAAA,EEHL,aFGgB,CAAA,UAAA,CAAA,GAAA,IAAA;EA+CZ,QAAI,EAAA,OAAA;;AAER,iBEhDI,kBAAA,CFgDJ,OAAA,EE/CD,2BF+CC,GE/C6B,qBF+C7B,CAAA,EE9CT,GF8CS,CE9CL,YF8CK,CAAA;AAGM,iBElCF,eAAA,CFkCE,MAAA,EEjCR,QFiCQ,EAAA,OAAA,EEhCP,2BFgCO,CAAA,EE/Bf,YF+Be;;;cGvDL;UAEI,gBAAA;EHCA,IAAA,EAAA,MAAA;EA+CD,IAAA,EG9CR,GH8CY,CG9CR,YH8CQ,CAAA;;AAER,iBG7CI,mBAAA,CH6CJ,MAAA,EG5CF,SH4CE,EAAA,OAAA,EG3CD,qBH2CC,CAAA,EG1CT,gBH0CS;AAGM,iBGvBF,uBAAA,CHuBE,MAAA,EGvB8B,SHuB9B,CAAA,EGvB0C,gBHuB1C;AACL,iBGbG,mBAAA,CHaH,MAAA,EGb+B,SHa/B,CAAA,EAAA,OAAA;;;;;;;AArDb;AA+CA;;;;;;;;;;ACzBA;;;;;;;;;;AC7Ba,aEuBD,QAAA;EFrBK,WAAA,GAAA,aAEL;EAII,gBAAA,GAAA,aAAkB;EACvB,eAAA,GAAA,cAAA;EAA8B,mBAAA,GAAA,cAAA;EAClC,kBAAA,GAAA,cAAA;EAAJ,SAAA,GAAA,WAAA;EAAG,aAAA,GAAA,aAAA;EAeU,eAAA,GAAe,aAAA;EACrB,cAAA,GAAA,aAAA;EACC,aAAA,GAAA,aAAA;EACR,gBAAA,GAAA,cAAA;EAAY,QAAA,GAAA,WAAA;;;;;;;;AFrBf;AA+CA;;;;;;;;;;ACzBA;;;;;;;;;;AC7Ba,cGmCA,gBAAA,CHnC2C;EAEvC,iBAAY,MAAA;EAMb,iBAAA,SAAkB;EACvB,iBAAA,IAAA;EAA8B;;;;AAgBzC;;;;;;;;ACrBA;AAEA;AAKA;;;;;AAyBA;AAWA;;;;ECxBY,QAAA,CAAA,OAAQ,EC2CA,SD3CA,CAAA,EAAA,IAAA;;;;ACWpB;;;;;;;;;;;;;;;;mBA8DmB,oBACN,iBACK,aAAa,KAC1B"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/decorators/schedulable.decorator.mts"],"sourcesContent":[],"mappings":";;;;;;;AA+BA;;;;;;;;;;;;;;;;;;;;;;;iBAAgB,WAAA;;;aAAuC;aACrC,oBAAoB,0BAAqB"}