Skip to content

interval option for exec-if #943

@Nervengift

Description

@Nervengift

I would like to have an additional parameter to the custom/script module that allows me to set an interval for the exec-if command that is different from the standard interval (a backoff timer for when the command fails).

One of my use cases wowuld be my script for showing information about the train I'm in: While I want the information to be refreshed every few seconds, most of the time I'm not on a train and so the check should not run too often.

My implementation idea would be:

  • add a exec-if-backoff parameter (or maybe interval-exec-if, interval-backoff?)
  • if the exec-if command fails and exec-if-backoff is present, wait for the configured backoff time (instead of interval) before runing it again
  • when exec-if succeeds, execute exec then wait for interval

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions