cancel
Showing results for 
Search instead for 
Did you mean: 

=Time.isTimeWindowOpen in precondition failing

Former Member
0 Kudos
65

Hi Guys

I am new to CPS and I am creating a Precondition for the first time, but think soemthing in the syntax might be wrong.

I defined a Time Window called Z_Fridays to use for executing certain jobs, as you would guess, only on Friday.

I set up the following Precondition in a job chain Step:

=Time.isTimeWindowOpen(Time.now('Africa/Johannesburg'), 'Z_Fridays')

The step keeps on failing. I also tried the one below but it also fails:

=Time.isTimeWindowOpen('Z_Fridays')

The step immediately goes into error as pasted below. Anyone who can maybe assist?

1. In the first case for =Time.isTimeWindowOpen(Time.now('Africa/Johannesburg'), 'Z_Fridays') :

Full Text Job 196415 (submitted from RQ1.ProjectSettlements copy from 2010/05/07 09:11:41,852 Africa/Johannesburg) could not be started due to an error evaluating its precondition: Precondition for step Step2 Proj Settlemets AUC Fridays of Job Chain RQ1.ProjectSettlements

Reason: com.redwood.scheduler.script.api.ScriptEngineEvaluationException

2. In the second case for =Time.isTimeWindowOpen('Z_Fridays') :

Full Text Job 196392 (submitted from RQ1.ProjectSettlements copy from 2010/05/07 09:06:12,867 Africa/Johannesburg) could not be started due to an error evaluating its precondition: Precondition for step Step2 Proj Settlemets AUC Fridays of Job Chain RQ1.ProjectSettlements

Reason: com.redwood.scheduler.script.api.ScriptEngineEvaluationException: Call to Time.isTimeWindowOpen :: wrong number of arguments

Details:

com.redwood.scheduler.script.api.ScriptEngineEvaluationException: Call to Time.isTimeWindowOpen :: wrong number of arguments

View Entire Topic
Former Member
0 Kudos

Hi Adriaan,

I think the second case should be:

=Time.isTimeWindowOpenNow('Z_Fridays')

So with the "Now" added to the call.

Do you have the free or the enterprise version of CPS ? If the free, then your first scenario may not work.

Regards,

Anton.