Alright. So. None of these create the scheduled task correctly with %DATE% and %TIME%:
SCHTASKS /Create /TN MyTask /TR "echo %DATE% %TIME% >> C:\SchtaskLog.txt" /SC MINUTE SCHTASKS /Create /TN MyTask /TR "echo ^%DATE^% ^%TIME^% >> C:\SchtaskLog.txt" /SC MINUTE SCHTASKS /Create /TN MyTask /TR "echo \%DATE\% \%TIME\% >> C:\SchtaskLog.txt" /SC MINUTE SCHTASKS /Create /TN MyTask /TR "echo `%DATE`% `%TIME`% >> C:\SchtaskLog.txt" /SC MINUTE
How does one escape a command-line argument with environment variables to be evaluated later?