TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Any way to trigger something on one PC and have it trigger a second part on another?

    General Discussion
    3
    7
    1.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • XanderX
      Xander
      last edited by

      Curious to see if this is a possibility (or a feature request) -- I'd like to run a trigger on my main PC, have it run a batch file with a ton of commands and, once done, hand the process over to a second PC.

      Is this a possibility? And, if it's not, could it become one?

      e.g. batch file that does blahblah commands and then finishes with:
      _ path_\triggercmd.exe -trigger PC2 -command triggername

      1 Reply Last reply Reply Quote 0
      • RussR
        Russ
        last edited by

        @xander, the best method for now is to use curl to call the API like this:

        curl -X POST https://www.triggercmd.com/api/run/triggerSave -H "authorization: Bearer (token from instructions page)" -H "content-type: application/json" -d "{\"computer\":\"DS\",\"trigger\":\"notepad\",\"params\":\"c:\\users\\Russ\\.TRIGGERcmdData\\commands.json\"}"
        

        I'm thinking of creating a Go executable that would call the API. It would be a simpler command line. Would the be helpful?

        Russell VanderMey

        XanderX 1 Reply Last reply Reply Quote 0
        • XanderX
          Xander @Russ
          last edited by

          @russ LOL. That's a rhetorical question, right? 🙂

          RussR 1 Reply Last reply Reply Quote 0
          • RussR
            Russ @Xander
            last edited by

            @xander, no I'm used to using curl, but I realize most people aren't. So ok - I get your point it - it would be useful. I'll work on it.

            Thanks again for your input @Xander.

            Russell VanderMey

            1 Reply Last reply Reply Quote 0
            • RussR
              Russ
              last edited by Russ

              @Xander, please test this when you get a chance.

              I put a link to each version in this forum post:
              https://www.triggercmd.com/forum/topic/196/tcmd-go-command-line-tool-is-available-now

              It reads your token from the .TRIGGERcmdData subfolder of your home folder, so it assumes you've installed the triggercmd agent on the computer where you run this tool.

              Russell VanderMey

              1 Reply Last reply Reply Quote 0
              • XanderX
                Xander
                last edited by

                I'm so sorry it took me so long to finally try this out. Did so tonight and it worked like a charm. Easy peasy. Thanks, Russ.

                RussR 1 Reply Last reply Reply Quote 0
                • RussR
                  Russ @Xander
                  last edited by

                  @xander, thanks for testing. I'm glad you asked for that. I needed a Go project, and a CLI tool that calls an API is a perfect use case for Go.

                  Russell VanderMey

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post