rem Dynamic week plan override
rem nvadynweek_override.cmd 
rem usage: nvadynweek_override <schedule plan number> <override action> <until date> <until time>
rem If no date and time specified, the next rotation date and time are used
rem The override action has to be specified with type (GRP), (KEY) or (OFS)
rem Example: nvadynweek_override 7001 "99 (GRP)"
rem
rem To reset an override, set the action to 0.
rem Example: nvadynweek_override 7001 0
rem
rem Schedule plan number: %1
rem Override action: %2
rem Optional end date: %3
rem Optional end time: %4

ECHO @OFF

if x%1 == x goto no_plan_number
if x%2 == x goto no_action


nve nvadynweek_override 1 -i1%1 -s1%2 -s2%3 -s3%4
goto END

:no_plan_number
:: No schedule plan number specified
goto END

:no_action
:: No action specified


:END
exit