Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-2167

Watch command - To keep running a command with X interval

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Minor Minor
    • 3.x Future
    • 2.12.3.Final
    • UI - Shell
    • None

      It would be great if forge has a watch command out of the box, you can use to keep running another command.

      The use case is to run a command that maybe display some runtime data or something. And then you want that to be displayed in real time.

      We have this command in Apache Karaf. Here is the options it provides which can be of inspiration

      karaf@root> watch --help
      DESCRIPTION
              shell:watch
      
      	Watches & refreshes the output of a command
      
      SYNTAX
              shell:watch [options] command
      
      ARGUMENTS
              command
                      The command to watch / refresh
      
      OPTIONS
              -a, --append
                      The output should be appended but not clear the console
              --help
                      Display this help message
              -n, --interval
                      The interval between executions of the command in seconds
                      (defaults to 1)
      

      The trick is that the console should be cleared.

      Use cases can also be for watching your servers where you have a plugin that has some commands to gather details. Then you can use watch to update the data in real time.

              Unassigned Unassigned
              cibsen@redhat.com Claus Ibsen
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: