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?

    Scheduled Pinned Locked Moved General Discussion
    7 Posts 3 Posters 2.7k Views 1 Watching
    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 Offline
      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 Offline
        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 Offline
          Xander @Russ
          last edited by

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

          RussR 1 Reply Last reply Reply Quote 0
          • RussR Offline
            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 Offline
              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 Offline
                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 Offline
                  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

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • First post
                    Last post