Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: 2nd Monday of the month
Topic Summary:
Created On: 04/25/2018 09:21 AM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 04/25/2018 09:21 AM
User is offline View Users Profile Print this message

Author Icon
Student (5-19 posts)

Posts: 7
Joined: 08/14/2013

I have a task that runs everyday but I need an if statement that will do an extra step if it's the 2nd Monday of the month.
I've searched the forums and can't find any examples of the formula needed to do the calculation.
Any help would me most appreciated.

 Category Survey
AutoMate 6 version:
Windows version:
 04/27/2018 02:27 PM
User is offline View Users Profile Print this message

Author Icon
Alex Escalante

Posts: 871
Joined: 02/26/2014

Hello David,

There are a few options to do this:

1. You can set the trigger to only run on the second Monday of every month. You can do so by selecting "specific days of the month, and changing the last value to "second" and the value next to it to "Monday" (see attached picture).

2. If you want to do this inside of a task, it will take a bit more logic. The earliest date a Monday can fall on is the 8th (if the first Monday falls on the 1st). The last date that it can fall on is the 15th (if the first Monday falls on the 7th). So with this logic in mind, you can check the day and date, using an "if" condition. In other words, if today is Monday, and the date is between the 8th and the 15th, then its the second Monday of the month.

3. Same logic as above, you can grab the first Monday of the month using the function "FirstDateOfDayInMonth(bstrDate, iDay)", then add 7 to that date.

Please let us know if these work for you.

 Category Survey
AutoMate 6 version:
Windows version:

Click for full image
Click for larger image


Alex Escalante | Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700 | F: +1.213.738.7665
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 2094 guests browsing this forum, which makes a total of 2094 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog