473,513 Members | 2,424 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Batch file scheduling not starting

5 New Member
I have written a batch file for ftp ing some log files from unix server... and scheduled it to run every day using Windows Scheduler... But when i see the next day the status will be "Could not start"... Anyone please help...
Apr 25 '07 #1
5 3431
RedSon
5,000 Recognized Expert Expert
You are trying to run a batch file on a unix machine to ftp some log files to somewhere? What are you trying to do? What does your batch file look like?
Apr 25 '07 #2
msivamani
5 New Member
I run the batch file from windows... It looks like...
Expand|Select|Wrap|Line Numbers
  1.      MD ".\%Date:/=%"
  2.     cd ".\%Date:/=%"
  3.     mkdir directory 1
  4.     mkdir directory 2
  5.     mkdir directory 3
  6.     mkdir directory 4
  7.     set FTP_USER_IP=<ip address>
  8.     set FTP_USER_NAME=<username>
  9.     set FTP_USER_PASSWD=<password>
  10.     set CURR_DIR=<path in the unix server where the log files are>
  11.  
  12.     set DIR_1=<directory 1>
  13.     set DIR_2=<directory 2>
  14.     set DIR_3=<directory 3>
  15.     set DIR_4==<directory 4>
  16.  
  17.     for %%D IN (DIR_1 DIR_2 DIR_3 DIR_4) DO goto %%D
  18.  
  19.     :DIR_1
  20.     @echo off
  21.  
  22.     >script.txt ECHO open %FTP_USER_IP%
  23.     >>script.txt ECHO %FTP_USER_NAME%
  24.     >>script.txt ECHO %FTP_USER_PASSWD%
  25.     >>script.txt ECHO cd %CURR_DIR%
  26.     >>script.txt ECHO cd %DIR_1%
  27.     >>script.txt ECHO lcd %DIR_1%
  28.     >>script.txt ECHO mget *.* 
  29.     >>script.txt ECHO lcd .. 
  30.     >>script.txt ECHO bye
  31.     FTP -i -s:script.txt 
  32.     del script.txt
  33.  
  34.     :DIR_2
  35.     @echo off
  36.  
  37.     >script.txt ECHO open %FTP_USER_IP%
  38.     >>script.txt ECHO %FTP_USER_NAME%
  39.     >>script.txt ECHO %FTP_USER_PASSWD%
  40.     >>script.txt ECHO cd %CURR_DIR%
  41.     >>script.txt ECHO cd %DIR_2%
  42.     >>script.txt ECHO lcd %DIR_2%
  43.     >>script.txt ECHO mget *.*
  44.     >>script.txt ECHO lcd .. 
  45.     >>script.txt ECHO bye
  46.     FTP -i -s:script.txt 
  47.     del script.txt
  48.  
  49.  
  50.     :DIR_3
  51.     @echo off
  52.  
  53.     >script.txt ECHO open %FTP_USER_IP%
  54.     >>script.txt ECHO %FTP_USER_NAME%
  55.     >>script.txt ECHO %FTP_USER_PASSWD%
  56.     >>script.txt ECHO cd %CURR_DIR%
  57.     >>script.txt ECHO cd %DIR_3%
  58.     >>script.txt ECHO lcd %DIR_3%
  59.     >>script.txt ECHO mget *.*
  60.     >>script.txt ECHO lcd .. 
  61.     >>script.txt ECHO bye
  62.     FTP -i -s:script.txt 
  63.     del script.txt
  64.  
  65.     :DIR_4
  66.     @echo off
  67.  
  68.     >script.txt ECHO open %FTP_USER_IP%
  69.     >>script.txt ECHO %FTP_USER_NAME%
  70.     >>script.txt ECHO %FTP_USER_PASSWD%
  71.     >>script.txt ECHO cd %CURR_DIR%
  72.     >>script.txt ECHO cd %DIR_4%
  73.     >>script.txt ECHO lcd %DIR_4%
  74.     >>script.txt ECHO mget *.*
  75.     >>script.txt ECHO lcd .. 
  76.     >>script.txt ECHO bye
  77.     FTP -i -s:script.txt 
  78.     del script.txt
Apr 26 '07 #3
msivamani
5 New Member
Hi Redson,
any updates on this problem?I sent you the batch file also... Can u figure out what the problem? I need very urgently...

Thanks,
Mohan.
Apr 27 '07 #4
RedSon
5,000 Recognized Expert Expert
Hi Redson,
any updates on this problem?I sent you the batch file also... Can u figure out what the problem? I need very urgently...

Thanks,
Mohan.
I don't think its anything wrong with your batch file. Can you schedule the bat to run in tasks every few minutes to see what the error is. If you can run the bat file manually on the command line without an error then it is a problem with the task manager. I'm not experienced with the task manager.
Apr 27 '07 #5
msivamani
5 New Member
I don't think its anything wrong with your batch file. Can you schedule the bat to run in tasks every few minutes to see what the error is. If you can run the bat file manually on the command line without an error then it is a problem with the task manager. I'm not experienced with the task manager.
The problem exists for the past 6 months and till now m not able to debug this...
Ok redson
I will check with my "service It" people...

Regards,
Mohan.
Apr 30 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
2316
by: Tony Proctor | last post by:
Hi everyone We're experiencing some serious anomalies with the scheduling of ASP threads. I'd be interested to hear if anyone knows what algorithm is used (e.g. simple round-robin, or something...
1
5785
by: Bucky Pollard | last post by:
I have a web service that needs to create a batch file and call it (since there are no APIs for the functionality I am looking for). I am using the Process and ProcessStartInfo objects. When I try...
3
2318
by: KRK | last post by:
I am having one batch file and using this I can start my Server. It will execute all exes while starting. Now my question is how to debug my exe using this batch file?? Is it possible to execute this...
3
2415
by: Leo Heska | last post by:
Hi I haven't seen the following problem mentioned anywhere We have an application written in VB.NET which executes a batch file (named startJob.cmd). We have discovered that if that batch file...
4
26788
by: CliffKing | last post by:
I am trying to use Windows Task Scheduler to run a batch file for an already open MS Access database. Below is the syntax to the batch file: Batch file: DailySalesExport.bat REM This runs the...
13
5409
by: MLH | last post by:
I have a batch file named GetConf.bat. It contains a line like this: ipconfig /all >c:\MyAppDir\IPdata.txt I believe I could run the line with something like ShellWait by Terry Kreft. Any...
3
4432
by: emman_54 | last post by:
Hi every one, I am trying to run a batch file using my asp.net application. I am using the Process class to run the batch file. When I run my web application, In the task manager, i could see...
4
18675
by: acantatore | last post by:
Hello! I'm looking for patterns, best practices, examples - reference material - that apply to Batch Processing, that is: Basic job control (start and stop) Job partitioning Parallel...
5
6437
by: benyod79 | last post by:
I'm hoping someone will be able to assist with this one. Using a scheduling program I'd like to run a batch file that runs a macro to creat e a copy of the opened database. Then, using batch again,...
0
7267
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7175
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7391
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7553
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7120
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4754
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3247
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1609
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
466
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.