I am trying to create a custom run schedule that I can’t seem to figure out in Orchestrator. So I have been trying to implement in Studio.
Let’s say I have an automation that in a 2 week cycle is not supposed to run on alternating Tuesdays. So today is Tuesday, (MM/DD/YYYY) 07/02/2019. I do NOT want to run an automation today.
Next Tuesday 07/09/2019 I DO WANT to run an automation.
The following Tuesday 07/16/2019 I do NOT want to run an automation, and the cycle continues.
I need a longer term answer that can follow this cycle for years. What I tried was using DateTime variables and try to calculate how many days have passed and then using MOD 14 to determine if it is a every other Tuesday or not.
((Today.Date - Date.Parse("07/02/2019")) MOD 14).ToString
where test = TimeSpan variable type.
I get the error:
Compiler error(s) encountered processing expression "((Today.Date - Date.Parse("07/02/2019")) MOD 14).ToString". Operator 'Mod' is not defined for types 'System.TimeSpan' and 'Integer'.
Im not sure what to do next. I’ve tried changing the variable types and playing with the assign logic. This is the closest i’ve come to.
Main.xaml (5.5 KB)