Michael Rosinger wrote on 18/09/2007 12:06:07:

List,

I need to schedule a job to run every n minutes on certain days between
certain hours.
At first inspection, it does not appear that WRKJOBSCDE
supports that degree of control.

As far as I know, the finest level of control for WRKJOBSCDE is a specific
time, on a given day or set of days.



Is this possible at all on the iSeries? We
have two systems - v5r3 and v5r4. TIA.

I resorted to writing code to do this - something like this:

do while true;
startTime = current date and time;
run repeating process;
endTime = current date and time;

runTime = (endTime - startTime) in seconds;
delay job (time between executions - runTime);

end loop;

This is for an "never ending" job. If you wanted to run only during
certain hours, you could pass an end timestamp. Then,

runTime = (endTime - startTime) in seconds;
delay job (time between executions - runTime);


would become

runTime = (endTime - startTime) in seconds;
nextRunTime = endTime + (time between executions - runTime);
if (nextRunTime < scheduledEnd);
delay job until nextRuntime;
endif;

I think other solutions have been discussed in the past as well.

Hope this helps,
Adam

Attention:

The information contained in this message and or attachments is
intended only for the person or entity to which it is addressed and may contain
confidential and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon, this
information by persons or entities other than the intended recipient is
prohibited. If you received this message in error, please contact the sender and
delete the material from any system and destroy any copies. Thank you for your
time and consideration.

Attention:

Le contenu de ce message et(ou) les fichiers ci-joints s?adressent
exclusivement à la personne ou -entité à laquelle ils sont destinés. Ils peuvent
contenir de l?information confidentielle, protégée et(ou) classifiée. Il est
strictement interdit à toute personne ou entité autre que le(la) destinataire
prévu(e) de ce message d?examiner, de réviser, de retransmettre ou de diffuser
cette information, de prendre une quelconque action en fonction ou sur la base
de celle-ci, ou d?en faire tout autre usage. Si vous avez reçu ce message par
erreur, veuillez communiquer avec l?expéditeur(trice), supprimer ce message et
les fichiers ci-inclus de tout système, et en détruire toutes copies, qu?elles
soient électroniques ou imprimées. Nous vous remercions de votre entière
collaboration.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.