Computing.Net > Forums > Programming > Batch file not run scheduled task

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch file not run scheduled task

Reply to Message Icon

Name: bdahlheim
Date: July 30, 2008 at 08:55:54 Pacific
OS: XP professional
CPU/Ram: 512 mb
Product: custom
Comment:

I run batch files on 19 different computers from the scheduled tasks. Each one is set up with the same permissions and types of users. Only one will not run the scheduled task properly. It will run if I manually run the scheudled task and if I manually run the batch file. I have tried to set the batch files to run from AT scheduler but it still will not run properly. This is the batch file I am trying to run.

@ECHO OFF

rmdir /s /q "C:\Raw_Data"

cd c:\
set folder="Raw_Data"
mkdir %folder%

title POSI SALES TRANSFER
cls

REM **************************************************
REM This file transfer sales from the Posi Backoffice
rem to the C:\Menulink\Raw_Data folder on the OM Computer
rem **************************************************

C:
cd\
CD RAW_DATA
xcopy l:\dbf\*.DBF /y
cd\

Again this runs perfect on 18 of the 19 computers I run it on. On the one computer the scheduled task does not run properly, it will run if I manually run it.

History:

There are two batch files that run in succession. The first(above) is set to erase files in a folder located in the C:, then to pull files from a networked drive to that folder. The second batch file then runs and reads the files pulled over and creates a dated sub with its own files. When the scheduled task runs everything seems to run fine. The files are erased then pulled over, but the batch file that reads those files and creates the dated sub does not read them correctly. The information needing to be pulled does not get pulled. If I erase the dated sub and manually run the second batch file again, it still does not read the pulled files correctly. Only when I erase all the files and run the first batch file manually does the second batch file work properly. So i thought this was a permissions issue and set an AT scheduler that creates these batch files. The AT scheduler ran but would not pull the files from the networked drive. Any suggestion would be helpful thank you!!



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: July 30, 2008 at 15:21:16 Pacific
Reply:

Where is the BAT?

What is your PATH?

What does AT show as scheduled?


=====================================
If at first you don't succeed, you're about average.

M2


0

Response Number 2
Name: Razor2.3
Date: July 30, 2008 at 17:18:30 Pacific
Reply:

How are you manually running this script?

What output are you getting? (You ARE saving the output, right? And leaving ECHO on, right?)


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Batch file not run scheduled task

Batch file to remove scheduled task www.computing.net/answers/programming/batch-file-to-remove-scheduled-task/17987.html

Batch file problem - cannot set var www.computing.net/answers/programming/batch-file-problem-cannot-set-var/18153.html

batch file scheduling www.computing.net/answers/programming/batch-file-scheduling/11933.html