
Chris Adaline (Customer) asked a question.
Is there a way to determine if the current date is in a Date List?
I'm trying to switch from static days of the month to specific business days (skipping holidays) so I created a few Date Lists for this. I had used conditional statements so I could have the same task do different things based on the date. Now, with the Date Lists, I'd like to have conditional statements based on which Date List the current date falls in. Thanks.
i.e.:
IF TODAY_DATE in DateList_FirstBusDay DO 1st_Steps
why don't you just have different tasks scheduled on different days, using the datelists?
learn about/run getmicconfig.exe. i run it as a moveit task hourly, so i permanently have a pretty current xml file handy in a known location to query things like datelists whenever i want. once you have the xml, save the script below in moveit. it should produce a parameter you can call as [parm:todayisinthelist], as in an
"if [parm:todayisinthelist] matches "True"
--do something cool
i'm not sure how you would dynamically get the name of the datelist, so as it's written, might need a different version/copy of this script for every datelist you want to do this wtih, hard coded in the 3rd line (and the path to your xml config is hard coded in the first line)