Schtasks & Commands w/ Parameters

G

Guest

Using NTBackup in combination with schtasks requires one to pass in
parameters as part of the NTBackup command line. How do you get the /TR
switch to accept all the parameters required to run something like NTBackup?

Shortened example:

/TR "ntbackup backup ""@C:\temp\files.bks"" /J ""TEST JOB"""

I've tried all sorts of combinations, but I can't get the quotes right for
the schtasks to see all the ntbackup parameters as a single command line.
Using the example above, schtasks thinks /J is a schtasks parameter which
it's not.
 
B

Bill Stewart

Jay said:
Using NTBackup in combination with schtasks requires one to pass in
parameters as part of the NTBackup command line. How do you get the /TR
switch to accept all the parameters required to run something like NTBackup?

Shortened example:

/TR "ntbackup backup ""@C:\temp\files.bks"" /J ""TEST JOB"""

I've tried all sorts of combinations, but I can't get the quotes right for
the schtasks to see all the ntbackup parameters as a single command line.
Using the example above, schtasks thinks /J is a schtasks parameter which
it's not.

AFAIK, it's not possible to embed quotation marks in a command line
argument passed to Schtasks.exe (IIRC, Jt.exe has the same problem). One
possible solution is to put the required information in a shell script
and schedule the shell script.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top