Skip to content

Repeat strategy limitation #8

Open
@AI-Joe

Description

@AI-Joe

Problem

The current definitions of start and end time boxes the repeat strategy in. Meaning that you could not repeat indefinitely or even for multiple days between certain hours. The use case is to execute experiments on a schedule within business hours/days for an extended or indefinite duration of time.

Current

repeat:
      startTime: "2020-08-03T13:00:00Z"
      endTime: "2020-08-03T21:00:00Z"
      minChaosInterval: "30m"
      instanceCount: "1"
      includedDays: "Mon,Tue,Wed,Thu,Fri"

This will start at 1pm and end at 8:30pm UTC on the day defined. I'm not really sure where the included days come in to play here. The cron expression created seems like the actual day of the repeat times would not affect the creation of the engines. However, when the engines are actually created it will end the schedule once it is after the user specified end time.

repeat:
      startTime: "2020-08-03T13:00:00Z"
      endTime: "2021-08-03T21:00:00Z"
      minChaosInterval: "30m"
      instanceCount: "1"
      includedDays: "Mon,Tue,Wed,Thu,Fri"

This example, without temporarily halting the schedule, will execute every 30 minutes from the start to the end time excluding weekends.

Future

repeat:
      startTime: "2020-08-03T13:00:00Z"
      endTime: "2021-08-03T21:00:00Z"
      minChaosInterval: "30m"
      instanceCount: "1"
      includedDays: "Mon,Tue,Wed,Thu,Fri"
      indefinite: true (default false)

By adding this field the user can opt out of the after end time check, creating an indefinite repeat schedule. Then in the creation of the cron expression you could have something like return fmt.Sprintf("*/%d %d-%d * * %s", interval, startHour, endHour, includedDays), time.Minute * time.Duration(interval), nil

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions