in reply to using TaskScheduler to reboot Win32 machine

Try double quoting the whole thing and using single quote the part after the -e

my $APP_NAME = q#"c:\\perl\\bin\\perl.exe -MWin32 -e Win32::InitiateSy +stemShutdown('','Rebooting',5,1,1);"#