Any way to trigger something on one PC and have it trigger a second part on another?
-
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 -
@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?
-
@russ LOL. That's a rhetorical question, right?
-
-
@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-nowIt 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.
-
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.
-
@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.