kura icon indicating copy to clipboard operation
kura copied to clipboard

Add "start now" property to timer configuration

Open pintify opened this issue 4 years ago • 6 comments

Describe the solution you'd like An additional property (boolean) on the Timer Wire component to allow the first execution to be made immediatly. It is very useful when working with long periods to avoid the initial delay.

Describe alternatives you've considered I currently add another timer programmer by cron to execute now. Not very efficient.

pintify avatar Dec 21 '20 14:12 pintify

Hello, something has been added in develop with this PR: https://github.com/eclipse/kura/pull/2727

MMaiero avatar Dec 21 '20 14:12 MMaiero

Would it work also in cron mode? As I'm not sure by simply watching the commits.

In which release will it be included? I'm working on 4.1.2 but it is not there.

pintify avatar Dec 21 '20 14:12 pintify

It will be released with the upcoming release.

What is the use case for the cron scheduler?

MMaiero avatar Dec 21 '20 15:12 MMaiero

Great, thanks.

It may seem a bit specific, but I'm currently feeding a streaming operation component which in some operations require an initial read (such as a comparison between previous and current value) and when I use hourly timer I have to wait between 1 and 2 hours to see any result. An initial trigger would feed the operation and allow the data to be calculated in the first hour expected.

pintify avatar Dec 21 '20 15:12 pintify

Using the simple timer with 1h interval and 0 initial delay is not possible?

In any case we will consider this use case even if the base case considered for the cron timer is to schedule an operation in the future, for example to happen at a certain time.

MMaiero avatar Dec 21 '20 15:12 MMaiero

The processing must be done at exact hours. It is related with taxation of energy consumption. It would be more acceptable simply to leave that initial data go.

In any case we will consider this use case even if the base case considered for the cron timer is to schedule an operation in the future, for example to happen at a certain time.

I don't understand this.

pintify avatar Dec 21 '20 15:12 pintify