You can try something like this; enable/disable interface based on configuration name on a per-weekday-scheduler entry.
Since actual-interface-configuration cannot be enabled/disabled and interface don't display higher defined configuration values,
configuration (name) is the better choice.
/system scheduler
# Monday
add interval=1w name=mon-09:00:00 on-event="/caps-man interface enable [find configuration=\"cfg-Guest\"]" \
policy=read,write start-date=jul/09/2018 start-time=09:00:00
add interval=1w name=mon-17:00:00 on-event="/caps-man interface disable [find configuration=\"cfg-Guest\"]" \
policy=read,write start-date=jul/09/2018 start-time=17:00:00
# Tuesday
add interval=1w name=tue-09:00:00 on-event="/caps-man interface enable [find configuration=\"cfg-Guest\"]" \
policy=read,write start-date=jul/10/2018 start-time=09:00:00
add interval=1w name=tue-17:00:00 on-event="/caps-man interface disable [find configuration=\"cfg-Guest\"]" \
policy=read,write start-date=jul/10/2018 start-time=17:00:00
# etc..etc..
If unit reboots this schedule will not work.
I have a script that runs at start up that sets the day of the week.
There is also a script that sets the day of the week at 00:00:01 each day.
I was going to use this same variable to set the $GuestSchedule per day.
So you have one script that is constantly running. It should pick up the Timerange perday based on having that written as a global variable.
But once it imports the variable from :global GuestSchedule... it does not execute the commands in the variable... i.e.
:global GuestSchedule ($timetest>09:00:00)and($timetest<17:00:00)
Then the script that runs every 5 minutes... regardless of day...
:local timetest [/system clock get time]
:global GuestSchedule
:if ($GuestSchedule) do={/caps-man actual-interface-configuration enable [find configuration.ssid~"Guest"]} else= {/caps-man actual-interface-configuration disable [find configuration.ssid~"Guest"]}
I get a complaint of "value is not boolean".
Meaning it picks up the data but doesn't "execute it".
There is other logic in the script to check other conditions like "Primary Gateway Up Or Down." And to check if there is an actual change 1 or 0. This is to cut down on constantly enabling or disabling an interface once the condition is met.