|
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-2024 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.