How to schedule macro to run every 10 minutes but not on Saturday and Sunday and....

Share your macros, knowledge, solutions, services, ...
Post Reply
Petr
Posts: 106
Joined: Tue Oct 18, 2016 1:12 pm

How to schedule macro to run every 10 minutes but not on Saturday and Sunday and....

Post by Petr » Thu Nov 17, 2016 8:47 pm

How to schedule macro to run every 10 minutes but not on Saturday and Sunday and not during nights (between 7:00PM and 6:00AM)?

Schedule macro to run every 10 minutes and within the macro write a logic that exits macro if the current day is Saturday or Sunday and the time is between 7:00PM and 6:00AM. The code could look like this:

Code: Select all

<cmds>

<#> Check for correct time and exit if between 19:00 and 6:00
<if_num>("(_vCurrTime_Hour24 >= 19) _OR_ (_vCurrTime_Hour24 <= 6)")
   <exitmacro>
<endif>

<#> Check for correct day and exit if Saturday or Sunday
<if_num>("(_vCurrDate_DayOfWeek==7) _OR_ (_vCurrDate_DayOfWeek==1)")
   <exitmacro>
<endif>

<#> Do your macro here....


Post Reply