Help passing variable to shell_exec()

I need help with the below shell_exec command, I am prompting for user input to ask for a time the user would like to setup the computer to shutdown and then change the scheduled task on windows using the schtasks command. I am having trouble getting the variable from the prompt to work in the shell_exec command the time inputted from the user appears after the /ST switch.

Many thanks in advance

function contask_shutdown2() {
var txt;
var $shutdown2 = prompt(“What Time would you like to shutdown the computer daily?”,“23:30”);
alert ("The Computer will shutdown daily at " + $shutdown2);
shell_exec('schtasks /change /TN “TASK_SHUTDOWN-Normal-Night” /RP !P4tt3rd4l3 /ST ');
}

Sponsor our Newsletter | Privacy Policy | Terms of Service