You have the basic idea, you just need to assemble the expressions into the 
correct *collections*.

The Wiki contains an explanation and a tutorial:

http://cwiki.apache.org/confluence/display/OFBENDUSER/Temporal+Expressions

Temporal expressions are easy to understand if you break things down into 
smaller pieces:

> We've tried to setup the ff scenario where we want to run
> the service every
> 3am and 4am

A 3:00 AM expression will require an Intersection (MINUTE_00 *and* HOUR_03).

A 4:00 AM expression will require an Intersection (MINUTE_00 *and* HOUR_04).

Finally, the two intersections need to be combined in a Union (logical *or* - 3 
AM *or* 4 AM).

Keep in mind that you can create temporal expressions in the Web Tools 
application. That might help you visualize the expressions.

-Adrian


--- On Wed, 1/27/10, cqnunez <[email protected]> wrote:

> From: cqnunez <[email protected]>
> Subject: Re: Use of TemporalExpression with JobSandbox
> To: [email protected]
> Date: Wednesday, January 27, 2010, 12:34 AM
> 
> Thanks for the update on TemporalExpression classes..
> 
> We've tried to setup the ff scenario where we want to run
> the service every
> 3am and 4am
> 
> <TemporalExpression tempExprId="TE_01"
> tempExprTypeId="HOUR_RANGE"
> integer1="3" integer2="3"/>
> <TemporalExpression tempExprId="TE_02"
> tempExprTypeId="HOUR_RANGE"
> integer1="4" integer2="4"/>
> <TemporalExpression tempExprId="TE_03"
> tempExprTypeId="MINUTE_RANGE"
> integer1="0" integer2="0"/>
> 
> <TemporalExpression tempExprId="TE_04"
> tempExprTypeId="UNION"/>
> <TemporalExpressionAssoc fromTempExprId="TE_04"
> toTempExprId="TE_01"/>
> <TemporalExpressionAssoc fromTempExprId="TE_04"
> toTempExprId="TE_02"/>
> 
> <TemporalExpression tempExprId="TE_05"
> tempExprTypeId="INTERSECTION"/>
> <TemporalExpressionAssoc fromTempExprId="TE_05"
> toTempExprId="TE_03"/>
> <TemporalExpressionAssoc fromTempExprId="TE_05"
> toTempExprId="TE_04"/>
> 
> <JobSandbox jobId="TEST_FAM_AUTO_CREATE"
> jobName="Auto-create Fixed Asset
> Maintenances" runTime="2000-01-01 00:00:00.000"
> serviceName="createMaintsFromTimeInterval" poolId="pool"
> runAsUser="system"
> tempExprId="TE_05" maxRecurrenceCount="-1"/>
> 
> But we've found that the service is always scheduled at 4am
> the ff day. Have
> we made a mistake on how we set up the TemporalExpression
> entities? Any help
> would be most appreciated.
> -- 
> View this message in context: 
> http://n4.nabble.com/Use-of-TemporalExpression-with-JobSandbox-tp999679p1311344.html
> Sent from the OFBiz - User mailing list archive at
> Nabble.com.
> 


      

Reply via email to