it is possible to use TriggerCMD to shutdown multiple PCs at once?
-
I can't find much on this topic and I'm new to using TriggerCMD. Basically what im trying to do is startup and shutdown my PC and laptop at the same time. Both my PC and laptop have wake on lan capabilities. I found this thread but I dont really understand the directions. One user had suggested to "use one of your triggers to trigger the other one using an API call for example using curl." but i dont know what that means.
https://www.triggercmd.com/forum/topic/161/is-it-possible-to-use-ifttt-to-issue-a-command-to-multiple-computersAny help would be greatly appreciated, cheers!
-
@sykramsounds, for shutting down two PC's with one command, here are two options:
- Run a script on a third computer that runs two tcmd commands like this:
tcmd --computer laptop --trigger shutdown tcmd --computer pc --trigger shutdown
- Run a script on your PC that shuts down your laptop remotely, then shuts itself down, like this:
tcmd --computer laptop --trigger shutdown shutdown /f /sg /t 1
To startup both PC's, you'd definately need a third computer because both would be turned off. I recommend a Raspberry Pi because they're cheap and don't require much power to run.
-
thanks for replying Russ! could you just use the TriggerCMD app on iPhone to trigger the script (as the 3rd PC)? and would you use autohotkey to make the script? sorry im still new to this. I looked into the Raspberry Pi I think it would solve some issues. Eventually the goal is turn my PC, laptop and lights on/off simultaneously.
-
@sykramsounds, unfortunately you can't run the TRIGGERcmd agent on a phone. It's probably possible on a rooted Android, but not an iPhone.
Autohotkey isn't necessary in this case. You can just make a .bat file, and paste this text into it and you've got your script:
tcmd --computer laptop --trigger shutdown shutdown /f /sg /t 1
A lot of PC's allow you to setup the bios so they turn on when the power comes on, so one thing you could probably do is setup your laptop and PC to power on when AC power turns on, then use something like this:
https://www.amazon.com/Compatible-Assistant-Magic-Hue-Certified/dp/B07XNBVVXVYou could write a script that takes an on or off parameter. If it runs with on, it would turn those things on, and if it gets an off parameter, it would shut your laptop and PC down, then turn off AC power.
Those Smart Plugs can be controlled via IFTTT, so your script could run a curl command to call the IFTTT webhook API.