AnsweredAssumed Answered

System Date Time, Not Job Start Time

Question asked by MuckMoses on Nov 21, 2018
Latest reply on Nov 30, 2018 by rekch01

Hi All

 

Ive got a job that runs continually that's called via ACTIVATE_UC_OBJECT, not a scheduel, checking for a specific file but this doesn't want to check on weekends.

 

I tried the &$PHYS_DATE_WEEKDAY_NR# function but this returns the date the JOB started to run not the system time when the FUNCTION is run.

 

What I want to do is check for the file every hour for 48 hours but if it's saturday or Sunday I just want to go back to WAIT.

 

:SET &Loop1# = 1
:WHILE &Loop1# < 48

:   IF &$PHYS_DATE_WEEKDAY_NR# < 6

!      DO MY THING......
:       SET &Loop1# = &Loop1# + 1

:   END IF

:   WAIT 3600

:ENDWHILE

Outcomes