Examining the file, it looks like you copied this from rose suite-gcontrol and missed renaming the second instance of "cylc gui" to "cylc shutdown" leading to the confusion above. I'd suggest changing instances of "launch" to "run" as well as you don't really launch anything when you run the shutdown command.