On any Unix-like system, cron is a tool specifically designed to run programs at scheduled days/times. The scheduling is quite flexible and it simply executes a shell command. If you have really complex launching requirements, put them into a shell script.
On Windows, you can use the "Scheduled Tasks" feature. I only looked at it when it first appeared but have never used it. From what I recall it should be able to handle what you need.
Now, I have no idea how you're going to have the Java application exit, but since you didn't ask I'll assume you've got that covered.
Also, it seems a bit odd to me to want to start up a WebLogic server -- a very large and complex process with lots of initialization involved -- once a day. Usually servers run all the time so they are always available. So, my question is: Do you actually want to call a running WebLogic server via HTTP/S every midnight? If so, you can use the above techniques to call a tool like wget.
Joined: May 15, 2003
Hi David, thanks for reply..
my question is not start or run weblogic, but to run a single java program without using cron facility. Is it possible to call(run) thru weblogic or some other way(within java program).
If you dont want to use the chron facility .. Think this solution , ( I feel it's not a good solution ) create a java thread that runs continously like a demon, and use the process.exec() to call ( run ) the program when specific conditions are met.
If you want to put that Job under control of WebLogic, then its possible. Weblogic comes with a thirdparty tool for this. I dont exactly remember this name.
Why dont you want to use CRON, isn't your target machine a unix environment. because if you are going to use any tools like a scheduler as mentioned above, or implement your own code for it, then that is also going to perform the same action. Why to unneccsarily reinvent the wheel.
If you feel, making your own code, makes it portable to windows machine also, that is also wrong. You have Task Scheduler in Windows.
Work like you don't need the money. Love like you've never been hated. Dance like nobody's watching. Sing like nobody's listening. Live like it's Heaven on Earth.
Currently I Reside HereWEBlog