Annotation TinyTasker
-
- All Implemented Interfaces:
-
java.lang.annotation.Annotation
@Target(value = {ElementType.METHOD})@Retention(value = RetentionPolicy.RUNTIME) public @interface TinyTasker
A config file is recommended for all properties except `value`! Marks the execution method of the Task Bean. Note the following. - Methods without parameters can be registered and executed automatically. - Methods with parameters can only be registered and executed manually. - Polymorphism is not allowed, methods are located by name only (for simplicity and readability), and parameter lists are not used. - If there is a parameter, it must be of a specific type, stateless, and serializable (json by default). Annotation has a lower priority than property and a higher priority than default. The merged config is eventually saved to database, which manages the task with the id- Since:
2022-12-01
trydofor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public @interfaceTinyTasker.AutoAdding to a SpringBean can be auto config by Wings at startup.
-
Method Summary
Modifier and Type Method Description abstract Stringvalue()`propkey`, the key of the property, which defaults to `Class#method`. abstract Stringzone()timingZone, scheduling timezone in ZoneId format, default system time zone. abstract Stringcron()timingCron, scheduling expression, highest priority, affected by timingType, default spring cron format (seconds minutes hours days months weeks). abstract intidle()timingIdle, fixed idle between (seconds), priority second to timingCron,equivalent to fixedDelay. abstract intrate()timingRate, fixed frequency start (seconds), priority second to timingIdle, equivalent to fixedRate. -
-
Method Detail
-
value
abstract String value()
`propkey`, the key of the property, which defaults to `Class#method`. Its property type is Map[String,TaskerConf], located under the prefix `wings.tiny.task.define` e.g. `wings.tiny.task.define[pro.fessional.wings.tiny.task.schedule.TaskerTest#test].enable=false`
-
zone
abstract String zone()
timingZone, scheduling timezone in ZoneId format, default system time zone. Use the `Default` config if null or empty.
-
cron
abstract String cron()
timingCron, scheduling expression, highest priority, affected by timingType, default spring cron format (seconds minutes hours days months weeks). Not use the `Default` config
-
idle
abstract int idle()
timingIdle, fixed idle between (seconds), priority second to timingCron,equivalent to fixedDelay. end to start, 0 is invalid, Not use the `Default` config
-
rate
abstract int rate()
timingRate, fixed frequency start (seconds), priority second to timingIdle, equivalent to fixedRate. start to start, 0 is invalid, Not use the `Default` config
-
-
-
-