Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
alerts
 Login/Join
 
Silver Member
posted
I am having an issue getting the alert functionality to work for what I need it to do. I need my update program to run when a source database is updated. So, my condition is true when the highest day in the source db is greater than the highest day in my destination db. This should happen between 9 and 10:30 AM M-F.
I am stumbling with what appears to be contridictions in the RC date/time schedule verus the alert schedule.
For example if I schedule my RC job at 9AM it will then check the condition until true and then run my process, however it'll then keep running checking. At this point forward the 9AM start time is insignificant. Ideally, I'd like it to stop checking until the next day at 9AM. I tried both 'CONTINUE' and 'RESET' from the alert options but that only controls the report output and not the actual check from taking place.

Is there a way to stop it until the next day? If not, does the checking process which will run all day & night consume resources? I haven't been able to catch it using an agent even though it most certainly has to. I have tried using the alert sched option 'delay' for 24 hours, however if my job actually runs at 10:25 then it won't run until 24 hours from then which is past my 9am start time. It would be ideal if the delay could be set to a time of day instead of x amount of time from now.

I have read the manuals on alerts but it seems they lack how the RC scheduling options interact with the alert schedule options.

What I'd like to do is have the RC start checking the alert at 9 until the condition is true, run my process, then stop checking until the next day at 9 AM.

Any ideas would be MUCH appreciated.


wf 767 running on w2k3 srvr
 
Posts: 46 | Registered: September 22, 2006Report This Post
Expert
posted Hide Post
http://www.informationbuilders.com/support/developers/rcaster.html
here's the article by Jodye Yates on how to have your procedure actually update the caster schedule file. its on the area of the Point called "Focus on Developers"..
or...you could do it in 1 schedule at 9am, and your single procedure would first check the condition.. if its ready, then process, but if its not, then use the SLEEP command to wait 10 minutes, and check it again. This ties up an agent, do you care? (this is the way i do it for a daily data load that comes in at semi-random times)
-top.loop
-* check some condition here
TABLE FILE CAR
PRINT * IF COUNTRY IS 'BURKINAFASO'
ON TABLE HOLD
END
-RUN
-IF &LINES GT 0 GOTO process;
SLEEP 600
-RUN
-GOTO top.loop ;
-process
-* now do your thing
-* i do have a counter on the sleep loops, tho.
-* if the loops get to be more than 20 or so, i just bail out and my fex creates an html message that emails to me.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
If you do care about the agents part of you solution could be done in DOS
(you might remember that scripting tool from the old days...)




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Silver Member
posted Hide Post
Thanks susannah, I was able to pull some logic out of Jodye Yates article. I created a module I call from the RC job that rechedules the current job in 10 minutes or runs the job then re-schedules until next day. It isn't perfect because I get email notices every 4 to 5 minutes when this runs even though I set it for 10 minutes. I played around a bit with some offset minutes, but it wasn't worth the time to perfect.

Because I'm an open source backer here it is.
If there are any improvements worthwhile let me know.
-*********************************************************
-* THIS FEX IS UPDATES THE NEXT RUNTIME IN BOTSCHED
-*********************************************************
-*******************************************************************************
-* Passed to this fex must be the following vars: (otherwise defaulted to zero)
-* &SCHED_ID = this is the schedule ID for the RC job
-* &incDAYS = this is the number of days you want to increment the start time to
-* &incHOURS = this is the number of hours you want to increment the start time to
-* &incMINUTES = this is the number of minutes you want to increment the start time to
-* &incFROMNOW = this indicator is set if you want the start time vars to be added to
-* the current time. Otherwise times are added to 12AM. Values are Y/N.
-** EXAMPLE:
-** EX app/SCHEDRCJ incDAYS='0',incHOURS='2',incMINUTES='30',incFROMNOW='Y',SCHEDid='S1230tfl9003'
-*******************************************************************************
-DEFAULT &incDAYS=0;
-DEFAULT &incHOURS=0;
-DEFAULT &incMINUTES=0;
-DEFAULT &incFROMNOW='Y';
-DEFAULT &SCHEDid=' ';
-RUN
-SET &incDAYS_IN_MS=1000 * 60 * 60 * 24 * &incDAYS;
-SET &incHOURS_IN_MS=1000 * 60 * 60 * &incHOURS;
-SET &incMINUTES_IN_MS=1000 * 60 * &incMINUTES;
-SET &incTOTAL_IN_MS=(&incDAYS_IN_MS + &incHOURS_IN_MS + &incMINUTES_IN_MS) / 1000;
-SET &NOWDATE=&YYMD;
-* The following offset is for daylight savings *********************
-SET &OFFSETHOURS = IF &NOWDATE IS-FROM 20070401 TO 20071028 THEN 5
-ELSE IF &NOWDATE IS-FROM 20080406 TO 20081026 THEN 5
-ELSE IF &NOWDATE IS-FROM 20090405 TO 20091025 THEN 5
-ELSE IF &NOWDATE IS-FROM 20100404 TO 20101031 THEN 5
-ELSE 6;
-********************************************************************
DEFINE FILE BOTSCHED
-* Get (in milliseconds) :
-* the # of days from 19700101 to now
-* the hours/mins from start of today to now
-* the offset for next run time from now
-* Add them together and set equal to next run time.
-*******************************************************************************
-* Getting date diff
DAYSDIFF/D8=DATEDIF('19700101','&YYMD', 'D');
-* Milliseconds to now from the start of 19700101
-* 1000 millisec (1 sec) x 60 (1 minute) x 60 (1 hour) x 24 (1 day) x #ofDays
DAY_DIFF_IN_MS/D32=1000*60*60*24*DAYSDIFF;
-*******************************************************************************
-* Getting hour/min diff
NOWDATETIME_A/HYYMDS=HGETC(8, 'HYYMDS');
NOWDATETIME/HYYMDS=HADD(NOWDATETIME_A, 'minute', -3, 8, 'HYYMDS');
HRMN_FROMNOW_IND/A1 WITH SCHEDULEID='&incFROMNOW';
HOURMIN_DIFF_IN_MS/D12 = IF HRMN_FROMNOW_IND EQ 'N' THEN 0 ELSE (HTIME(8, NOWDATETIME, 'D12.2'));
-*******************************************************************************
-* Getting increment amount until next run time
OFFSET_IN_MS/D12=( &OFFSETHOURS * 60 * 60 * 1000) + ( &incTOTAL_IN_MS * 1000);
-*******************************************************************************
-* Add millisecond times together
NEXTRUNTIME_IN_MS/D13=DAY_DIFF_IN_MS + HOURMIN_DIFF_IN_MS + OFFSET_IN_MS;
-* Pad next run time in MS with zeros
NEXTRUNTIME_NEW/A32 = '0000000000000000000' | (FTOA(NEXTRUNTIME_IN_MS, '(D13c)', 'A13'));
END

SET ASNAMES = ON
TABLE FILE BOTSCHED
PRINT SCHEDULEID NEXTRUNTIME_NEW AS NEXTRUNTIME
-* NOWDATETIME_A
-* NOWDATETIME
-* HOURMIN_DIFF_IN_MS
WHERE SCHEDULEID EQ '&SCHEDid'
ON TABLE HOLD AS SCHDHOLD
END
-IF &RECORDS EQ 0 GOTO NOUPDATE;
-RUN
MODIFY FILE BOTSCHED
FIXFORM FROM SCHDHOLD
MATCH SCHEDULEID
ON MATCH UPDATE NEXTRUNTIME
ON NOMATCH REJECT
DATA ON SCHDHOLD
END
-NOUPDATE
-RUN


wf 767 running on w2k3 srvr
 
Posts: 46 | Registered: September 22, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders