Solved

How to schedule a job on windows-NT

Posted on 2001-07-03
5
225 Views
Last Modified: 2012-05-04
Hi,

       How to schedule a job on windows-NT to run a Java program at specific time. Need detailed info.

Thanks,
Anil
0
Comment
Question by:anilvvnn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 3

Expert Comment

by:dnoelpp
ID: 6248644
With the AT command. Open the command window and enter the following:

C:\> at java <yourJavaProgram>

first check whether it really works if started immediately.

C:\> java <yourJavaProgram>

Type at to show all pending tasks and with at /delete you can delete tasks. at /? shows you all possibilities.
0
 

Author Comment

by:anilvvnn
ID: 6251029
Nope, its not working when I type
c:\>at java <JAVA_PRG>  
         its throwing invalid command. Even I tried using
c:\>at 20:35 "java <JAVA_PRG>"
          or
c:\>at 20:35 "java.bat"
                where I included 'java' command in batch file but doest seem to be working and when I type 'at' to see jobs,

c:\>at
Status ID   Day                     Time          Command Line
-------------------------------------------------------------------------------
Error   1   Next 4                  8:35 PM       java.bat

 
   I found Error in status field, how could we find error msg. Can u give me detailed and working response.


Thanks,
Anil
0
 
LVL 3

Accepted Solution

by:
dnoelpp earned 100 total points
ID: 6251513
Rules:

1. Use absolute paths. For example if your batch file is in c:\java\test.bat, call at c:\java\test.bat. And all commands need absolute paths too. So type instead of just java: "C:\jdk13\bin\java.exe". This may not be neccessary but this depends of your configuration of the computer. For example, I discovered that my network drive letter U:\ doesn't exist under at. Why? Because at logs to the computer as another user than you. Perhaps as user "SYSTEM" but I don't know.

2. pause after each command in the batch file helps a lot.

3. use at /interactive

This way I got everything working!

Good luck!
0
 
LVL 3

Expert Comment

by:dnoelpp
ID: 6251535
This article might help you in working with the at command.

http://www.elementkjournals.com/ewn/9408/ewn40046.htm

cheers!
0
 
LVL 14

Expert Comment

by:sudhakar_koundinya
ID: 9017952
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:


[points to dnoelpp]


Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
sudhakar_koundinya
EE Cleanup Volunteer
---------------------
If you feel that your question was not properly addressed, or that none of the comments received were appropriate answers, please post your concern in THIS thread.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question