making an alert that will stop a thread at a particular time

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf making an alert that will stop a thread at a particular time

  • Creator
    Topic
  • #52560
    derek march
    Participant

      I want to make an alert that stops a particular thread at 11:29PM every saturday and then starts it back up at 12:05 every sunday morning.

      It seems there should be a way to do this through alerts but I have not really used these often.  My only idea so far is to set it to file size and make it so if a particular file is not 0 bytes then it will run threadctl pstop.  However I have not been successful.

      Does anyone know of a better way for me to achieve this goal?

      Thanks

    Viewing 1 reply thread
    • Author
      Replies
      • #74675
        Jim Kosloskey
        Participant

          Derek,

          If you are on some flavor of UNIX use cron (or another scheduler if you have one) with a shell script using the appropriate command line commands for stopping/starting threads.

          If on Windows, then again use a scheduler but you will need to use another scripting language (not sure if .bat is still effective) but the Cloverleaf commands should be the same.

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #74676
          James Cobane
          Participant

            Derek,

            As an academic exercise, you can do this via the Alert Configurator if you wish by using the “Thread Status” as your condition, setting the “Time Window” appropriately and using the ‘exec’ action to run the appropriate hcicmd.  You would need 2 separate alerts, the first would be to check if the thread status is up (at the desired time) and then exec the hcicmd to stop it.  The second would be to check if the thread status is down during the desired time frame then exec the hcicmd to start it.

            Hope this helps.

            Jim Cobane

            Henry Ford Health

        Viewing 1 reply thread
        • The forum ‘Cloverleaf’ is closed to new topics and replies.