Batch file will not run via Scheduled Tasks

  • Thread starter Thread starter David C
  • Start date Start date
D

David C

Hi everyone,

Quick question - why will this batch file that contains
only these lines below work when i manualy run it, but
when i try to run it via Control Panel -> Scheduled Tasks
it just wont run. -

COPY /Y "E:\Cubes\ALL\" "F:\GG_JDE\Allocations\"
COPY /Y "E:\Cubes\PS\" "F:\GG_JDE\Projected_Sales\"
COPY /Y "E:\Cubes\SH\" "F:\GG_JDE\Sales_History\"

Any help would be great.

Cheers
David
 
Apply an administrative account and password to the Task Job.

Dave



| Hi everyone,
|
| Quick question - why will this batch file that contains
| only these lines below work when i manualy run it, but
| when i try to run it via Control Panel -> Scheduled Tasks
| it just wont run. -
|
| COPY /Y "E:\Cubes\ALL\" "F:\GG_JDE\Allocations\"
| COPY /Y "E:\Cubes\PS\" "F:\GG_JDE\Projected_Sales\"
| COPY /Y "E:\Cubes\SH\" "F:\GG_JDE\Sales_History\"
|
| Any help would be great.
|
| Cheers
| David
 
David said:
Apply an administrative account and password to the Task Job.

Dave

Or add the appropriate 'net use' commands (complete with userid and
password) at the beginning of the batch file to map the drives.
 
Here is a more general tip to resolve such issues. Modify
your batch file as below, then examine the logs to see
what's going on.

@echo off
echo %date% %time% Start of job > c:\test.log
echo UserName=%UserName% >>c:\test.log
COPY /Y "E:\Cubes\ALL\" "F:\GG_JDE\Allocations\" 1>>test.log 2>test.err
COPY /Y "E:\Cubes\PS\" "F:\GG_JDE\Projected_Sales\" 1>>test.log 2>>test.err
COPY /Y "E:\Cubes\SH\" "F:\GG_JDE\Sales_History\" 1>>test.log 2>>test.err
 
Back
Top