Sample Task: AutoMate Holiday List

image for article

This month’s sample task will demonstrate one of the numerous ways to use the AutoMate holiday list when scheduling tasks or workflows.  The sample task will allow users to choose a holiday to search against, read the entire AutoMate holiday list, narrow the search by parameters for only United States holidays, and then find the date for the holiday selected.  Holiday dates change from year to year and tracking those changes manually can be tedious.  Having AutoMate track those changes by parsing out only the relevant holiday and date can be useful in scenarios where a user would have to generate a weekly or monthly timesheet or calendar.

Many people may not know this, but AutoMate has a holiday list that is installed within the software and contains the holidays for several countries around the world.  By default, the AutoMate holiday list is installed to C:\ProgramData\Network Automation\Automate9 folder.

Since steps 1-10 hold general comments and all of our created variables required for the task, let’s skip ahead to Step 11 to focus on the actual processing and parsing of the holiday list,

In Step 11, a selection box containing a list of holidays in a dropdown menu will pop up.  From that menu you can pick whichever holiday you feel like searching for.  In this example, Memorial Day is the chosen holiday (see Figure 1).

 Company Holidays

Figure 1

At this point, the task knows which holiday it needs to find within the AutoMate holiday list, but before it can start, we need to first narrow the search parameters.  Initially what Step 13 does is reference the AutoMate holiday list, which contains holidays from countries all over the world, and populates the result into a variable (see Figure 2).

AutoMate Holiday List 

Figure 2

In order to search for a date corresponding to Memorial Day, Steps 14-16 will parse out only the United States holidays, store those results into another variable,  and then search against that smaller list  (see Figure 3). 

US Holidays

Figure 3

Now the sample task will search for Memorial Day and find the exact date it falls on.  Steps 18-20 focuses on searching for Memorial Day, finding the date for only the current year, and then parsing out only the information we want.  The results of Steps 10-20 are stored into a new variable (see Figure 4).   

Holiday Value

Figure 4

Now that we have our holiday and a date, Step 21 will perform a trim text so that the holiday name is removed.   What we are left with is a date value stored in a new variable (see Figure 5). 

Holiday Date 

Figure 5

The final step, Step 22, is more for visual purposes and simply shows a dialog box with the holiday we searched for and the date it falls on this year (see Figure 6). 


Figure 6

 You can dowload the complete sample task here


AutoMate Sample Tasks