Skip to content

Add a TimeCheck class #576

@skxeve

Description

@skxeve

Is your feature request related to a problem? Please describe.
The cliboa currently lacks a direct and built-in mechanism to prevent or halt the execution of a process or a scenario during specific, unwanted time ranges (e.g., outside of business hours or during system maintenance windows). This leads to a risk of processes running unintentionally during critical periods, which may result in resource conflicts or unexpected behavior

Describe the solution you'd like
We would like to add a TimeCheck class that controls the flow of execution based on the current time and a user-defined allowed time range.

The proposed utility should accept the following arguments:

  • from: The start time of the executable period, specified as a 4-digit number (e.g., 0900 for 9:00 AM). The default value should be 0000.
  • to: The end time of the executable period, specified as a 4-digit number (e.g., 1700 for 5:00 PM). The default value should be 2359.
  • quiet: A boolean flag to determine the exit status when the process is aborted due to being outside the allowed time range. Default should be True. When it is True, the step will be end with successful status.

Metadata

Metadata

Assignees

No one assigned

    Labels

    difficulty: easyRequires ability to implement a single module or few small modules, and make unit tests for it.featA new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions