NIdhi_9608

Avoid running recurrent job on weekend

Discussion created by NIdhi_9608 on Aug 21, 2017
Latest reply on Aug 22, 2017 by peter_grundler_automic
Hi All,
I have created one UC4 job that suppose to be run on weekdays in every 1 hour..But I can see the job is running on weekend as well.
below is my script for the reference.can anyone let me know the reason for the same and how can I avoid that.

SET &EVENT_NAME# = &$NAME#
:PRINT &EVENT_NAME#
:SET &TRAITEMENT_TRRIG# = "test"
:PRINT &TRAITEMENT_TRRIG#

:IF SYS_STATE_ACTIVE(JOBP, 'test') = 'Y'

:   P "WORKFLOW IS ACTIVE"

:ELSE

:   SET &RUN_WF# = ACTIVATE_UC_OBJECT(test)

:ENDIF
: WAIT  3600
: print "wait 60 min"
!:   SET &RUN_EVENT# = ACTIVATE_UC_OBJECT(test)
:SET &RUNID# = GET_UC_OBJECT_NR("test")
:set &deact# =CANCEL_UC_OBJECT(&RUNID#)
:SET &RUN_EVENT# = RESTART_UC_OBJECT("test",LAST,,,)

Outcomes