updates in krontab docs

This commit is contained in:
InsanusMokrassar 2023-06-20 10:49:52 +06:00
parent 2943c73964
commit c924bef2d9
2 changed files with 12 additions and 10 deletions

View File

@ -2,7 +2,7 @@
#### How oftern new versions are releasing? #### How oftern new versions are releasing?
Not very often. It depend on libraries (coroutines, korlibs/klock) updates and on some new awesome, but lightweight, features coming. Not very often. It depends on libraries (coroutines, korlibs/klock) updates and on some new awesome, but lightweight, features coming.
#### Where this library could be useful? #### Where this library could be useful?
@ -16,4 +16,4 @@ In two words, you should call `buildSchedule` or `createSimpleScheduler`:
buildSchedule("5 * * * *").asFlow().collect { /* do something */ } buildSchedule("5 * * * *").asFlow().collect { /* do something */ }
``` ```
You can read more about syntax in [String format](../describing/string-format.md) section. You can read more about syntax in [String format](../describing/string-format.md) section.

View File

@ -7,7 +7,8 @@
## `buildSchedule` ## `buildSchedule`
> NOTE: **Custom KronScheduler** > NOTE: **Custom KronScheduler**
> You always able to create your own scheduler. In this section will be presented different ways and examples around standard `CronDateTimeScheduler` builders `buildSchedule`. You can read about schedulers in [KrontabScheduler](../describing/krontabscheduler.md) >
> You are always may create your own scheduler. In this section will be presented different ways and examples around standard `CronDateTimeScheduler` builders `buildSchedule`. You can read about schedulers in [KrontabScheduler](../describing/krontabscheduler.md)
Currently, `buildSchedule` is the recommended start point for every scheduler. Usually, it is look like: Currently, `buildSchedule` is the recommended start point for every scheduler. Usually, it is look like:
@ -45,13 +46,14 @@ Shortcuts are the constants that are initializing in a lazy way to provide prese
* `AnyTimeScheduler` - will always return incoming `DateTime` as next * `AnyTimeScheduler` - will always return incoming `DateTime` as next
* `Every*Scheduler` - return near * since the passed `relatively`: * `Every*Scheduler` - return near * since the passed `relatively`:
* `EverySecondScheduler` * `EverySecondScheduler` / `KronScheduler.everyMillisecond`
* `EveryMinuteScheduler` * `EverySecondScheduler` / `KronScheduler.everySecond`
* `EveryHourScheduler` * `EveryMinuteScheduler` / `KronScheduler.everyMinute`
* `EveryDayOfMonthScheduler` * `EveryHourScheduler` / `KronScheduler.hourly`
* `EveryMonthScheduler` * `EveryDayOfMonthScheduler` / `KronScheduler.daily`
* `EveryYearScheduler` * `EveryMonthScheduler` / `KronScheduler.monthly`
* `EveryYearScheduler` / `KronScheduler.annually`
### Flows ### Flows
Here currently there is only one extension for `KronScheduler`: `KronScheduler#asFlow`. As a result you will get `Flow<DateTime>` (in fact `SchedulerFlow`) which will trigger next `emit` on each not null `next` `DateTime` Here currently there is only one extension for `KronScheduler`: `KronScheduler#asFlow`. As a result you will get `Flow<DateTime>` (in fact `SchedulerFlow`) which will trigger next `emit` on each not null `next` `DateTime`