• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
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.7k
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.
  • X
    Xander
    last edited by Jun 19, 2018, 5:08 AM

    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
    • R
      Russ
      last edited by Jun 20, 2018, 12:03 AM

      @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

      X 1 Reply Last reply Jun 20, 2018, 12:14 AM Reply Quote 0
      • X
        Xander @Russ
        last edited by Jun 20, 2018, 12:14 AM

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

        R 1 Reply Last reply Jun 20, 2018, 12:19 AM Reply Quote 0
        • R
          Russ @Xander
          last edited by Jun 20, 2018, 12:19 AM

          @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
          • R
            Russ
            last edited by Russ Jun 23, 2018, 4:30 PM Jun 21, 2018, 2:07 AM

            @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
            • X
              Xander
              last edited by Aug 7, 2018, 6:10 AM

              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.

              R 1 Reply Last reply Aug 8, 2018, 10:14 PM Reply Quote 0
              • R
                Russ @Xander
                last edited by Aug 8, 2018, 10:14 PM

                @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