From 8afdc90f58bcc6d289b29f26ee8f745498b7949d Mon Sep 17 00:00:00 2001 From: Yazawazi <47273265+Yazawazi@users.noreply.github.com> Date: Wed, 27 Apr 2022 07:19:30 +0800 Subject: [PATCH] cron expression comments --- src/main/java/emu/grasscutter/task/Task.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/main/java/emu/grasscutter/task/Task.java b/src/main/java/emu/grasscutter/task/Task.java index 8dbf20a69..34638a777 100644 --- a/src/main/java/emu/grasscutter/task/Task.java +++ b/src/main/java/emu/grasscutter/task/Task.java @@ -6,8 +6,22 @@ import java.lang.annotation.RetentionPolicy; /* * So what is cron expression? -* second minute hour day month week year +The format of a Cron expression is as follows. +Second Minute Hour Day Month Week Year +Seconds: 0-59 +Minute: 0-59 +hour: 0-23 +Day: 1-31 +Month: 1-12 +Week: 1-7 (0-6 sometimes) +Year: Specify your own + +If you want to express every second or every minute or something like that, use the * symbol in that position; +if you want to express more than one such as every 15 minutes and every 30 minutes, you can write:`15, 30`. + +For the rest of the wildcard characters, please Google them yourself */ + @Retention(RetentionPolicy.RUNTIME) public @interface Task { String taskName() default "NO_NAME";