Skip to Content
0
Former Member
May 07, 2010 at 07:26 AM

=Time.isTimeWindowOpen in precondition failing

34 Views

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