B
basis_consultant
Hello,
On Win2003, I intend to use the scheduler to execute a script
(Say test_script.bat) which contains the following 2 lines:
net use n: ... (Server,drive and password specified) > > log1
dir N: >> log2 (The command is actually an SAP script using the
drive, but this example keeps things simple and
also fails).
When I execute this script (As test_script.bat) through the
command line, everything works well. The 2 log files are
created or appended. Drive N: is successfully mapped.
However, when I execute the '*.bat. file through the
Windows scheduler, with the same userid, the following
happens:
(i) log1 is created or appended, stating that the
command executed successfully.
(ii) log2 is not created or appended
(iii) The scheduler log indicates that one statement
was executed, but that the script finished with an
exit code of '1'.
Even when I change the 'dir N: >> log2' to 'dir C:\temp >> log2',
log2 is not created when the job is executed through the
scheduler. Thus, the issue is not the mapping to N:.
I would greatly appreciate assistance with the following
questions:
(i) Why would both lines of the'*.bat' file execute successfully
from the command line, but only the first line execute when
running the script through the scheduler, using the same
userid?
(ii) What does an exit code of '1' mean for the Windows
scheduler?
(iii) Is there a way for me to increase the log level of the
Windows scheduler to capture more information?
Thanks,
BASIS Consultant
On Win2003, I intend to use the scheduler to execute a script
(Say test_script.bat) which contains the following 2 lines:
net use n: ... (Server,drive and password specified) > > log1
dir N: >> log2 (The command is actually an SAP script using the
drive, but this example keeps things simple and
also fails).
When I execute this script (As test_script.bat) through the
command line, everything works well. The 2 log files are
created or appended. Drive N: is successfully mapped.
However, when I execute the '*.bat. file through the
Windows scheduler, with the same userid, the following
happens:
(i) log1 is created or appended, stating that the
command executed successfully.
(ii) log2 is not created or appended
(iii) The scheduler log indicates that one statement
was executed, but that the script finished with an
exit code of '1'.
Even when I change the 'dir N: >> log2' to 'dir C:\temp >> log2',
log2 is not created when the job is executed through the
scheduler. Thus, the issue is not the mapping to N:.
I would greatly appreciate assistance with the following
questions:
(i) Why would both lines of the'*.bat' file execute successfully
from the command line, but only the first line execute when
running the script through the scheduler, using the same
userid?
(ii) What does an exit code of '1' mean for the Windows
scheduler?
(iii) Is there a way for me to increase the log level of the
Windows scheduler to capture more information?
Thanks,
BASIS Consultant