Jump to content

schtasks help


Recommended Posts

I don't know if this is really a general user question, but I'm having a little trouble with creating a scheduled task from the command line.

My command looks like this:

schtasks /create /ru "System" /d THU /st 16:32:00 /sc WEEKLY /tn FileMove9 /tr "C:\Progra~1\Apache~1\Tomcat~1.0\webapps\backup\WEB-INF\batch\run.cmd C:\Progra~1\Apache~1\Tomcat~1.0\webapps\backup\WEB-INF\tasks\FileMove9.txt"

The contents of run.cmd are:

cd "C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\backup\WEB-INF\classes"

javaw main.FileMove "%~f1"

Now I know what you're thinking. The problem must lie in the main.FileMove class.

However, copying and pasting the line "C:\Progra~1\Apache~1\Tomcat~1.0\webapps\backup\WEB-INF\batch\run.cmd C:\Progra~1\Apache~1\Tomcat~1.0\webapps\backup\WEB-INF\tasks\FileMove9.txt" onto a command prompt actually runs and generates the desired results.

I'm not sure what the problem could be; I used all the short names of the directories so that there wouldn't need to be any quotes inside (originally I had a lot of problems with quotes).

Any suggestions would be helpful.

Thanks,

B.J.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy