Package dev. inmo. krontab
Types
This interface was created for abstraction of next operation. Currently, there is only dev.inmo.krontab.internal.CronDateTimeScheduler realisation of this interface inside of this library, but you it is possible to create your own realisation of this interface for scheduling, for example, depending of users activity or something like this
This interface extending KronScheduler to use DateTimeTz with taking into account offset of incoming time for next operation.
Use this class as a super class in case you wish to implement krontab-based enqueuing of works
Extend this class in case you wish to base on KrontabTemplate. It will automatically handle request of kronScheduler and put it in setUpRequest
This class contains template and can be simply serialized/deserialized. In fact that class will work as dev.inmo.krontab.internal.CronDateTimeScheduler due to the fact that toKronScheduler will return it under the hood
Functions
Shortcut for createSimpleScheduler
Parse incoming string and adapt according to next format: "* * * * *" where order of things:
Will execute block without any checking of result
Will buildSchedule using scheduleConfig and call doInfinity with block
Will execute block without any checking of result
Will buildSchedule using scheduleConfig and call doInfinity with block
Will execute block without any checking of result
Will buildSchedule using scheduleConfig and call doInfinity with block
Execute block once at the KronScheduler.next time and return result of block calculation.
Will buildSchedule using scheduleConfig and call doOnceLocal on it
Execute block once at the KronScheduler.next time and return result of block calculation.
Execute block once at the KronScheduler.next time and return result of block calculation.
Will buildSchedule using scheduleConfig and call doOnceLocal on it
Will execute block while it will return true as a result of its calculation
Will buildSchedule using scheduleConfig and call doWhile with block
Will execute block while it will return true as a result of its calculation
Will buildSchedule using scheduleConfig and call doWhile with block
Will execute block while it will return true as a result of its calculation
Will buildSchedule using scheduleConfig and call doWhile with block
This method is shortcut for enqueueKronSchedulerWork with reified T
This method is shortcut for enqueueKronSchedulerWork with reified T parameter
This method is shortcut for enqueueKronSchedulerWork with initialScheduler. It will try to calculate delay by itself. In case if KronScheduler.next of initialScheduler will return null, work WILL NOT be enqueued
This method will enqueue OneTimeWorkRequest with workName and existingWorkPolicy. Use setUpRequest callback in case you need some additional actions to do before request will be enqueued
Will enqueueKronSchedulerWork with KronScheduler from krontabTemplate and call setUpRequest on setting up OneTimeWorkRequest.Builder with Data which will be used to OneTimeWorkRequest.Builder.setInputData after setUpRequest completed
Create new one CollectionKronScheduler to include all KronSchedulers of this
Shortcut for buildSchedule
Shortcut for buildSchedule
Will create KrontabTemplateWrapper from this
Properties
KronScheduler.next will always return com.soywiz.klock.DateTime.now
KronScheduler.next will always return com.soywiz.klock.DateTime.now + one day
KronScheduler.next will always return com.soywiz.klock.DateTime.now + one hour
KronScheduler.next will always return com.soywiz.klock.DateTime.now + one minute
KronScheduler.next will always return com.soywiz.klock.DateTime.now + one month
KronScheduler.next will always return com.soywiz.klock.DateTime.now + one second
KronScheduler.next will always return com.soywiz.klock.DateTime.now + one year