0

I have created a batch file in an attempt to add a scheduled task however when this runs it does not execute the command any ideas?

echo off
Start CMD /k 
From CMD /k SchTasks /Create /SC DAILY /TN “Cache Task” /TR “C:\Temp Batch     Two.bat” /ST 09:00

Any help would be appriciated.

1 Answer 1

4
  • start cmd /k will open a new command window.
  • from is not a command, so will just emit an error message

A batch file is already a sequence of commands to execute. So if you want to execute commands in a batch file, then just do so (and incidentally, use straight quotes instead of typographic ones, as the latter won't work):

SchTasks /Create /SC DAILY /TN "Cache Task" /TR "C:\Temp Batch Two.bat" /ST 09:00

(I also assume the batch file you want to run doesn't contain five spaces.)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.