Focal Point
­[SOLVED]Caster scheduling weekly as well as month start

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/724108064

June 07, 2010, 04:11 PM
Marikaki
­[SOLVED]Caster scheduling weekly as well as month start
Hi,

How can I handle the scheduling of a report that should run every Monday morning as well as the the of the 1st of the month?

Actually I have 2 schedules: 1 for every Monday, another one for month start. But I anticipate 2 reports when the 1st of the month will a Monday.... What do I have to do to control this? Any exception parameters?

Need your help again, thanks.
quote:

This message has been edited. Last edited by: Marikaki,


Marikaki

WF 7.7.03m, MRE, BI Dashboard, DevStudio, Report Caster, Windows 7, I.E. 8/9, Apache Tomcat 6.0, Derby Output formats: Excel2K, PDF, HTML, AHTML

June 08, 2010, 03:19 AM
Tony A
Marikaki,

One method that I have employed over time is to have the run dates set in a calendar file with a final step in the caster job to read the date file for the next date and then reset the nextruntime value in BOTSCHED accordingly. This would obviously require a level of maintenance but may give you a greater flexability.

Another method is to use DM to calculate the BOW date and check to see if it is a Monday or the first of the month. If it is neither of these then set &KILLRPC to 'Y'. This would require that the job is run every day and might not be what you want. However, the overhead is small as the DM would be the very first part of the process to run and would be short most of the time.

Just two ideas of many that you might be given.

T

Edited for Speel chucking

This message has been edited. Last edited by: Tony A,



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
June 08, 2010, 08:41 AM
jgelona
We use the 2nd method as described by Tony A.

We have a preprocessing fex that check for the correct day to run. If it is not, we set &&KILL_RPC (2 & not one) to Y and the job stops. Also, you have to use the pre-processing fex in every task in the job (at least we do in 7.1.3) which is a pain.

Hey now there's an idea. Use &KILL_RPC to kill a task and &&KILL_RPC to kill the job. Since && are globals, seems &&KILL_RPC could tell RC to flush the rest of the job and &KILL_RPC would flush the current task.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
June 08, 2010, 09:01 AM
Tony A
quote:
&&KILL_RPC (2 & not one)
Well spotted Roll Eyes

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
June 08, 2010, 09:27 AM
Marikaki
Guys,

because I'm very busy these days I will get back to you as soon as I can. I've read the ideas and I don't understand very well I will need more detail in a while to execute.
Thank you for understanding.


Marikaki

WF 7.7.03m, MRE, BI Dashboard, DevStudio, Report Caster, Windows 7, I.E. 8/9, Apache Tomcat 6.0, Derby Output formats: Excel2K, PDF, HTML, AHTML

June 08, 2010, 10:36 AM
Tony A
Very simple to understand really -

-SET &DOWK = DOWK(&YYMD,'A3');
-SET &DOM  = EDIT(&DMYY,'99$');
-SET &&KILLRPC = IF &DOWK NE 'MON' AND &DOM NE '01' THEN 'Y' ELSE 'N';
-? &&

Create a fex in your APP PATH and set it as a preprocess in your scheduled task.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
June 08, 2010, 02:29 PM
Hua
Nice to know these solutions. Thanks.

The dumb way I have been using is to have 2 scheduled entries, one runs every Monday, and the other runs 1st of the month. That's because I not ready to do some killing yet.


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
June 08, 2010, 02:53 PM
Marikaki
Great Tony!

Now it is clear to me. I am not really familiar with Webfocus and this solution would not appear to me.

Thank you very much.


Marikaki

WF 7.7.03m, MRE, BI Dashboard, DevStudio, Report Caster, Windows 7, I.E. 8/9, Apache Tomcat 6.0, Derby Output formats: Excel2K, PDF, HTML, AHTML

June 08, 2010, 03:00 PM
njsden
Good One

Very nice Tony! Thanks.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
June 09, 2010, 02:38 AM
Tony A
You're all very welcome, so nice to know that three lines of DM can make people happy Smiler

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
June 09, 2010, 10:11 AM
jgelona
Actually you can do it with 1 line of code:
-*
-*  Run job on the 1st day of the month or every Monday
-*
-SET &&KILL_RPC=IF &DATED EQ 01 OR &DATEW EQ 1 THEN 'N' ELSE 'Y';


&DATED returns the 2 digit day of the month.
&DATEW returns the 1 digit day of the week, 1-Mon, 2-Tues, ... 7-Sun.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
June 09, 2010, 10:20 AM
Marikaki
Wow! We're getting more efficient!

Thanks everybody.

I didn't try yet, but I will as soon as I have a little moment.

Smiler


Marikaki

WF 7.7.03m, MRE, BI Dashboard, DevStudio, Report Caster, Windows 7, I.E. 8/9, Apache Tomcat 6.0, Derby Output formats: Excel2K, PDF, HTML, AHTML

June 09, 2010, 10:34 AM
Tony A
That cat sure is getting skinned lately Wink

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10