Skip to content

Commit

Permalink
chore: crontab expression
Browse files Browse the repository at this point in the history
  • Loading branch information
RozmarinUS committed May 29, 2024
1 parent 2a79dfd commit 6735ceb
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/stat-reporter/enums/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './stat-cron-epxression.enum';
62 changes: 62 additions & 0 deletions packages/stat-reporter/enums/stat-cron-epxression.enum.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
export enum StatCronExpression {
EVERY_MINUTE = "*/1 * * * *",
EVERY_2_MINUTES = "*/2 * * * *",
EVERY_3_MINUTES = "*/3 * * * *",
EVERY_4_MINUTES = "*/4 * * * *",
EVERY_5_MINUTES = "*/5 * * * *",
EVERY_6_MINUTES = "*/6 * * * *",
EVERY_7_MINUTES = "*/7 * * * *",
EVERY_8_MINUTES = "*/8 * * * *",
EVERY_9_MINUTES = "*/9 * * * *",
EVERY_10_MINUTES = "*/10 * * * *",
EVERY_11_MINUTES = "*/11 * * * *",
EVERY_12_MINUTES = "*/12 * * * *",
EVERY_13_MINUTES = "*/13 * * * *",
EVERY_14_MINUTES = "*/14 * * * *",
EVERY_15_MINUTES = "*/15 * * * *",
EVERY_16_MINUTES = "*/16 * * * *",
EVERY_17_MINUTES = "*/17 * * * *",
EVERY_18_MINUTES = "*/18 * * * *",
EVERY_19_MINUTES = "*/19 * * * *",
EVERY_20_MINUTES = "*/20 * * * *",
EVERY_21_MINUTES = "*/21 * * * *",
EVERY_22_MINUTES = "*/22 * * * *",
EVERY_23_MINUTES = "*/23 * * * *",
EVERY_24_MINUTES = "*/24 * * * *",
EVERY_25_MINUTES = "*/25 * * * *",
EVERY_26_MINUTES = "*/26 * * * *",
EVERY_27_MINUTES = "*/27 * * * *",
EVERY_28_MINUTES = "*/28 * * * *",
EVERY_29_MINUTES = "*/29 * * * *",
EVERY_30_MINUTES = "*/30 * * * *",
EVERY_31_MINUTES = "*/31 * * * *",
EVERY_32_MINUTES = "*/32 * * * *",
EVERY_33_MINUTES = "*/33 * * * *",
EVERY_34_MINUTES = "*/34 * * * *",
EVERY_35_MINUTES = "*/35 * * * *",
EVERY_36_MINUTES = "*/36 * * * *",
EVERY_37_MINUTES = "*/37 * * * *",
EVERY_38_MINUTES = "*/38 * * * *",
EVERY_39_MINUTES = "*/39 * * * *",
EVERY_40_MINUTES = "*/40 * * * *",
EVERY_41_MINUTES = "*/41 * * * *",
EVERY_42_MINUTES = "*/42 * * * *",
EVERY_43_MINUTES = "*/43 * * * *",
EVERY_44_MINUTES = "*/44 * * * *",
EVERY_45_MINUTES = "*/45 * * * *",
EVERY_46_MINUTES = "*/46 * * * *",
EVERY_47_MINUTES = "*/47 * * * *",
EVERY_48_MINUTES = "*/48 * * * *",
EVERY_49_MINUTES = "*/49 * * * *",
EVERY_50_MINUTES = "*/50 * * * *",
EVERY_51_MINUTES = "*/51 * * * *",
EVERY_52_MINUTES = "*/52 * * * *",
EVERY_53_MINUTES = "*/53 * * * *",
EVERY_54_MINUTES = "*/54 * * * *",
EVERY_55_MINUTES = "*/55 * * * *",
EVERY_56_MINUTES = "*/56 * * * *",
EVERY_57_MINUTES = "*/57 * * * *",
EVERY_58_MINUTES = "*/58 * * * *",
EVERY_59_MINUTES = "*/59 * * * *",
EVERY_HOUR = "* */1 * * *"
}
1 change: 1 addition & 0 deletions packages/stat-reporter/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './enums';
export * from './interfaces';

export * from './nestcord-stat-reporter.module';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CronExpression } from '@nestjs/schedule';
import { AxiosHeaders, Method, RawAxiosRequestHeaders } from 'axios';
import { Method, RawAxiosRequestHeaders } from 'axios';
import { StatCronExpression } from '../enums';

export interface ServiceOption {
/**
Expand Down Expand Up @@ -34,9 +34,10 @@ export interface ServiceOption {

/**
* Crontab expression
* @returns CronExpression
* @returns StatCronExpression
* @returns string
*/
schedule?: CronExpression;
schedule?: StatCronExpression | string;
}

export interface NestCordStatReporterOptions {
Expand Down

0 comments on commit 6735ceb

Please sign in to comment.