Feature request: move [params] to a different spot
-
I've been using TriggerCMD since it had appeared as a IFTTT service, and frankly I like when I use the parameters in a CMD/PowerShell. Now, I would really wish if there's a way to move the [params] variable to a different section. For instance, I want the command to restart OR shutdown in 5 minutes. The way I want it to work would be something like
shutdown [params] /t 5
. When I tried to add the placeholder myself, with Allow Paramaters totrue
, there is 2 param duplicates such asshutdown [params] /t 5[params]
. Is there a way to do that? If not, please have that feature in the near future. -
@mikey186, that's an interesting idea. I made it so the parameters get tacked on to the end of your command after a space because the use-case I envisioned was a bash, batch, or powershell script. Scripts allows you to use the script execution parameters anywhere in the commands, for example my TRIGGERcmd command could be c:\scripts\shutdown_or_reboot.bat and the batch script would have these contents:
shutdown %1 /t %2
Then I could remotely specify whether to reboot or shutdown, and specify how many seconds:
- Reboot in 10 seconds: c:\scripts\shutdown_or_reboot.bat /r 10
- Shutdown in 5 seconds: c:\scripts\shutdown_or_reboot.bat /s 5
So you can already do what you want to do, but I see value in your feature request because you could do the same thing without having to write a script. I would probably implement with placeholders for each parameter with syntax similar to the Voice Reply field, like this:
TRIGGERcmd command: shutdown {{param1}} /t {{param2}}
What do you think?
-
@Russ I like the idea. Though with two parameters (maybe more if needed)? That would be even more better with an ultimate advantage. Especially if I have a backup program (like AOMEI Backupper with cmd prompts OR a BAT script w/parameters on top).
Although one way I would wish it would be better is if there is a TriggerCMD exe to execute the CMD commands. For instance, in AOMEI backupper, I want to send the post-command to TriggerCMD to fire up the script.
-
@mikey186, you want the backup program to run a command on a remote computer via TRIGGERcmd at the end of a backup job? If not, please explain more about what you want to do.
-
@Russ no, simply when a backup is completed, I want the post-command to send it to TriggerCMD to launch the cmd script.
-
@mikey186, I'm probably missing something, but if the cmd script is local to the computer running the backup, it seems to me you don't even need TRIGGERcmd - you could just make the post-backup command run the cmd script.
If you do want to use TRIGGERcmd though, you could make the post-backup command run the tcmd utility that can run any of your TRIGGERcmd commands - on a local or remote computer.
-
@Russ well never mind, I manage to find a workaround. But I would hope to see a advantage to move the PARAMs and/or more PARAMs in the future. It would be interesting.....