I want to schedule sources based on weekday and time.
What I've working is this
programme = switch([({10h-12h}, source1),
({12h-18h}, source2)])
What I want and tried is this
programme = switch([({(1w-5w) and (10h-12h)}, source1),
({(1w-5w) and (12h-18h)}, source2),
({(6w-7w) and (10h-14h)}, source3),
({(6w-7w) and (14h-18h)}, source4)])
Initially I tried this, but had no success either
workday = switch([({10h-12h}, source1),
({12h-18h}, source2)])
weekend = switch([({10h-14h}, source3),
({14h-18h}, source4)])
programme = switch([({1w-5w}, workday),
({6w-7w}, weekend)])
This is rather stripped down example. For maintainability it would be nice to get the last shown version working.
And yes I tried this between 10 and 18. I know the options are not collectively exhaustive but anything else will be caught by a fallback later in the code.