Task scheduler refuse to run .cmd no log
2000 servr domain controller. here i the batch. f: cd users xcopy *. * /s blah blah couple other switches not relevant to issue. When i run the batch it runs. when i set task scheduler to run it, it blinks up then goes away.
2000 servr domain controller. here i the batch.
f:
cd users
xcopy *.* /s blah blah couple other switches not relevant to issue.
When i run the batch it runs. when i set task scheduler to run it, it blinks up then goes away. So, I tried >\log.txt
the log is empty when it tries to run fom task scheduler. the user account used to run the task is the main Domain Admin account.
When doble clicked manually it runs, copies everything, and makes a nice fat logfile.
!?!!
f:
cd users
xcopy *.* /s blah blah couple other switches not relevant to issue.
When i run the batch it runs. when i set task scheduler to run it, it blinks up then goes away. So, I tried >\log.txt
the log is empty when it tries to run fom task scheduler. the user account used to run the task is the main Domain Admin account.
When doble clicked manually it runs, copies everything, and makes a nice fat logfile.
!?!!
Participate on our website and join the conversation
This topic is archived. New comments cannot be posted and votes cannot be cast.
Responses to this topic
Problem solved. Here is what happened. Task scheduler in this case does not have access to the windows path. When I did a copy blah t worked because copy is an internal command. When I Hard Code xcopy's location, it works.
Go figure.
For example: to copy one folder and all subdirectories to the d: drive: and create a log in the root of f:
f:
cd User_Shared_Folder
c:\winnt\system32\xcopy *.* d:\backup\users /e /c /v /h /r /y >\bloguser.txt
Now the question is is this normal? When i doublle click the batch it works, when task scheduler runs the task the batch has no access to the path and can't find xcopy and fails.
Go figure.
For example: to copy one folder and all subdirectories to the d: drive: and create a log in the root of f:
f:
cd User_Shared_Folder
c:\winnt\system32\xcopy *.* d:\backup\users /e /c /v /h /r /y >\bloguser.txt
Now the question is is this normal? When i doublle click the batch it works, when task scheduler runs the task the batch has no access to the path and can't find xcopy and fails.