George,
You would not want to queue a separate sbatch command to do this. If you used the OpenHPC stack, you could potentially use wwsh ssh -a <command>
where the -a
is for all or alternatively replace this with the nodes that you want to run the command on.
As for doing it from your existing batch script, have you considered using expect
? The expect
program would allow you to type something like send -- "t\r"
(the t character followed by a return key) if the time that you needed the input to be run would be deterministic. If you want more information on expect
, check out something like https://likegeeks.com/expect-command/ .
In my experience can be helpful if your cluster doesn't have a lot of space or you want max performance to use a command line only approach instead of installing x11 on a system (or at least the parts of it required to run xdotool
). Personal comfort level will dictate this.
t + enter
", where is that keypress going? Is it an input that the (first) script is waiting for? – JigglyNaga Aug 22 '19 at 10:40xdotool
as described in eg. How to send keystrokes (F5) from a terminal to a GUI program – JigglyNaga Aug 22 '19 at 13:40