|
Hi Mike, I agree with Paul. We have a client that runs detail and summary billing every day using the job scheduler. While I could see a rationale for occasionally executing jobs via the web, especially if you don't have a 5250 emulator or Java program to execute the commands, here the job scheduler does exactly what you need and you don't have a batch job intermixed with your web processing. The base CLLE we use to run jobs looks like /* Pgm calls Java app */ /* must be ILE CL to work properly */ PGM /* Invoke PGM with proper arguments */ JAVA CLASS(MyClass) PARM(anArgString) + CLASSPATH('/dirForMyClass:/qibm/proddata/ja+ va400/jt400ntv.jar:') END: ENDPGM Multiple directories, if needed, are separated by colons, not semicolons, as shown above. HTH, Joe Sam Joe Sam Shirah - http://www.conceptgo.com conceptGO - Consulting/Development/Outsourcing Java Filter Forum: http://www.ibm.com/developerworks/java/ Just the JDBC FAQs: http://www.jguru.com/faq/JDBC Going International? http://www.jguru.com/faq/I18N Que Java400? http://www.jguru.com/faq/Java400 ----- Original Message ----- From: "Clapham, Paul" <pclapham@xxxxxxxxxxxxx> To: "Java Programming on and around the iSeries / AS400" <java400-l@xxxxxxxxxxxx> Sent: Tuesday, July 13, 2004 12:20 PM Subject: RE: Scheduling a Java PGM to run... > To schedule a job to run on the first day of every month, the CL command > > ADDJOBSCDE JOB(...) CMD(...) FRQ(*MONTHLY) SCDDATE(*MONTHSTR) JOBD(...) > JOBQ(...) > > should work. The ... in the CMD() parameter should be a CL program that sets > your classpath and calls RUNJVA to run your class, or a call to RUNJVA with > the CLASSPATH parameter set appropriately. > > I don't think there is any "best" way to cause a servlet to run at a certain > time. Servlets are meant to respond to HTTP requests, and it doesn't sound > like you need to process an HTTP request with this application. So I'd > suggest you spend the time figuring out what needs to be in your classpath. > > PC2 > > -----Original Message----- > From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx] > On Behalf Of Mike Burdette > Sent: July 13, 2004 08:56 > To: java400-l@xxxxxxxxxxxx > Subject: Scheduling a Java PGM to run... > > I need to call a Java PGM on the first of every month. I am a Java Web > developer, but have written this as a Java application, as opposed to a > servlet. I have been running it from WDSC-i but need to move it to the > iSeries and have it run unattended on a scheduled basis. What is the best > way to do this? > > I have not had much success in running a Java app on the iSeries using the > RUNJVA command, my biggest issue being setting the CLASSPATH. But if using > the RUNJVA command in a CL and putting it in the job scheduler is the best > practice, I will work through it. Since my expertise lies in servlet > programming, I would prefer to make this a web application. What is the best > way to fire a servlet at a specified time? > --
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.