Page 1 of 1

Schedule for next to last business day of month

Posted: Wed Jan 31, 2018 5:48 pm
by elwayfan446
Does anyone have an idea on how I can schedule an event to run on the next to last business day of the month? I know there isn't anything I can do by simply using the "month" option in the schedule. I am wondering if there is a way to use expression monitor to write an expression with date/time variables to acheive this. I haven't been able to quite figure it out.

Re: Schedule for next to last business day of month

Posted: Wed Jan 31, 2018 5:55 pm
by elwayfan446
I will follow up by asking if there is also a way to schedule a task to run the last business day of each month?

Re: Schedule for next to last business day of month

Posted: Wed Jan 31, 2018 6:29 pm
by elwayfan446
As a manual workaround, I created global variables for the last business day of each month and used expression monitor to watch for that variable in order to run. Would like to be able to use a calculation so I wouldn't have to create new dates each year, but this should work.

Re: Schedule for next to last business day of month

Posted: Tue Feb 06, 2018 4:23 pm
by Oleg
You can setup your task as my example below

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1981091247
Comment=STRINGLIST
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task1"
Hide=INTEGER|0
ID=INTEGER|-617540483
LogOnAsUser=INTEGER|1
Name=STRING|"Last business day every moth"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER

[Actions\Action1]
ActionID=STRING|"A_SCRIPT_VBEVALUATE"
Enabled=INTEGER|-1
Name=STRING|"VB Evaluate"
Params=FOLDER

[Actions\Action1\Params]
expression=STRING|"isLastBusinessDay(""{Date}"")"
line00000000=STRING|"function isLastBusinessDay(StrDate)"
line00000001=STRING|"  isLastBusinessDay = false"
line00000002=STRING|"  dt = cDate(strDate)"
line00000003=STRING|"  'month"
line00000004=STRING|"  m = DatePart(""m"", dt)"
line00000005=STRING|"  'weekday"
line00000006=STRING|"  wd = DatePart(""w"", dt, vbMonday)"
line00000007=STRING|"  'logmessage(cstr(m) + ""; "" + cstr(wd))"
line00000008=STRING|"  if wd >=6 then"
line00000009=STRING|"    'saturday or sunday"
line0000000A=STRING|"    exit function"
line0000000B=STRING|"  end if"
line0000000D=STRING|"  dt1 = DateAdd(""d"",3,dt)"
line0000000E=STRING|"  'month"
line0000000F=STRING|"  m1 = DatePart(""m"", dt1)"
line00000010=STRING|"  if m1 = m then"
line00000011=STRING|"    'not in last 3 days of the month"
line00000012=STRING|"    exit function"
line00000013=STRING|"  end if"
line00000015=STRING|"  dt1 = DateAdd(""d"",1,dt)"
line00000016=STRING|"  'month"
line00000017=STRING|"  m1 = DatePart(""m"", dt1)"
line00000018=STRING|"  'weekday"
line00000019=STRING|"  wd1 = DatePart(""w"", dt1, vbMonday)"
line0000001B=STRING|"  if m1 <> m then"
line0000001C=STRING|"    isLastBusinessDay = true"
line0000001D=STRING|"  else"
line0000001E=STRING|"    'next day sunday or saturday"
line0000001F=STRING|"    if wd1 >= 6 then"
line00000020=STRING|"      isLastBusinessDay = true"
line00000021=STRING|"    end if"
line00000022=STRING|"  end if"
line00000024=STRING|"end Function"
line00000026=STRING|"'logmessage(isLastBusinessDay(""3/30/2018""))"
linecount=STRING|"39"
loadfromfile=STRING|"1"
variable=STRING|"match"

[Actions\Action2]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action2\Params]
case=STRING|"0"
connection=STRING|"0"
count=STRING|"1"
operator=STRING|"0"
type=STRING|"3"
value1=STRING|"{match}"

[Actions\Action3]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""This is last business day"""
Params=FOLDER

[Actions\Action3\Params]
icon=STRING|"1"
msg0=STRING|"This is last business day"
msg2=STRING|"Put your actions here."
msgcount=STRING|"3"
playsound=STRING|"0"
showmessage=STRING|"1"

[Actions\Action4]
ActionID=STRING|"A_FLOW_ELSE"
Enabled=INTEGER|-1
Name=STRING|"Else"

[Actions\Action5]
ActionID=STRING|"A_MISC_COMMENT"
Enabled=INTEGER|-1
Name=STRING|"//Nothing. This is NOT last business day"
Params=FOLDER

[Actions\Action5\Params]
comment=STRING|"Nothing. This is NOT last business day"

[Actions\Action6]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"

[Events]
Event1=FOLDER

[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_GENERAL_SHEDULER"
Params=FOLDER
UniqueID=INTEGER|1587115508

[Events\Event1\Params]
periodicity=STRING|"1"
periodparameter=STRING|"0111110"
periodparameter2=STRING|"00001"
startdate=STRING|"43137"
time0=STRING|"43200000"
timecount=STRING|"1"
wakeup=STRING|"0"
Save the text of the task to a file and use menu Task->Import to import the task into RoboTask.
Do not forget to enable the task after importing.

The algorithm is simple:
Check the date: is this last business day or not
next use If..Then action

Also I set the scheduler trigger as on screenshot
Scheduler parameters
Scheduler parameters
scheduler.png (20.75 KiB) Viewed 15237 times

Re: Schedule for next to last business day of month

Posted: Fri Feb 28, 2020 3:52 pm
by elwayfan446
Hi Oleg,

It has been awhile since you provided me with the task code for this. Believe it or not, I was just able to get back to testing this last month. When building the task with the code you provided and setting it up with the parameter in the screenshot below, the task is running every weekday of the last week of the month. Is there a way to only make it run on the last working weekday of the month?

Re: Schedule for next to last business day of month

Posted: Wed Mar 04, 2020 9:49 am
by Rukbunker
I had a simular problem before!!!! Check this out.

This task is being created with help of Oleg as well. This runs every night, at 00:01:00. It declares some variables which we used the whole day. Included the features which you are looking for. Have fun with it! In this case, you can use that together with a scheduler or "Start Task" action and hopefully get what you need.

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|0
Comment=STRINGLIST
ContinueOnError=INTEGER|1
DoNotStopWhenShutdown=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task97"
Hide=INTEGER|0
ID=INTEGER|1768439549
LogOnAsUser=INTEGER|1
Name=STRING|"[MAIN] 00 - 00:01 - DEFINE DATES"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|1
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action10=FOLDER
Action11=FOLDER
Action12=FOLDER
Action13=FOLDER
Action14=FOLDER
Action15=FOLDER
Action16=FOLDER
Action17=FOLDER
Action18=FOLDER
Action19=FOLDER
Action2=FOLDER
Action20=FOLDER
Action21=FOLDER
Action22=FOLDER
Action23=FOLDER
Action24=FOLDER
Action25=FOLDER
Action26=FOLDER
Action27=FOLDER
Action28=FOLDER
Action29=FOLDER
Action3=FOLDER
Action30=FOLDER
Action31=FOLDER
Action32=FOLDER
Action33=FOLDER
Action34=FOLDER
Action35=FOLDER
Action36=FOLDER
Action37=FOLDER
Action38=FOLDER
Action39=FOLDER
Action4=FOLDER
Action40=FOLDER
Action41=FOLDER
Action42=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER
Action9=FOLDER

[Actions\Action1]
ActionID=STRING|"A_FILE_DELETE"
Enabled=INTEGER|-1
Name=STRING|"Delete File"
Params=FOLDER

[Actions\Action1\Params]
Count=STRING|"1"
deletedirs=STRING|"0"
file0=STRING|"C:\Users\{UserName}\Downloads\*.*"
hidden=STRING|"1"
subdir=STRING|"0"
system=STRING|"1"
ToRecycleBin=STRING|"0"

[Actions\Action10]
ActionID=STRING|"A_MISC_COMMENT"
Enabled=INTEGER|-1
Name=STRING|"HOLIDAY"
Params=FOLDER

[Actions\Action10\Params]
comment=STRING|"HOLIDAY CHECKS"

[Actions\Action11]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action11\Params]
case=STRING|"0"
case#1=STRING|"0"
case#10=STRING|"0"
case#2=STRING|"0"
case#3=STRING|"0"
case#4=STRING|"0"
case#5=STRING|"0"
case#6=STRING|"0"
case#7=STRING|"0"
case#8=STRING|"0"
case#9=STRING|"0"
connection=STRING|"1"
count=STRING|"11"
operator=STRING|"0"
operator#1=STRING|"0"
operator#10=STRING|"0"
operator#2=STRING|"0"
operator#3=STRING|"0"
operator#4=STRING|"0"
operator#5=STRING|"0"
operator#6=STRING|"0"
operator#7=STRING|"0"
operator#8=STRING|"0"
operator#9=STRING|"0"
type=STRING|"2"
type#1=STRING|"2"
type#10=STRING|"0"
type#2=STRING|"2"
type#3=STRING|"2"
type#4=STRING|"2"
type#5=STRING|"2"
type#6=STRING|"2"
type#7=STRING|"2"
type#8=STRING|"2"
type#9=STRING|"2"
value1=STRING|"{Date}"
value1#1=STRING|"{Date}"
value1#10=STRING|"{Date}"
value1#2=STRING|"{Date}"
value1#3=STRING|"{Date}"
value1#4=STRING|"{Date}"
value1#5=STRING|"{Date}"
value1#6=STRING|"{Date}"
value1#7=STRING|"{Date}"
value1#8=STRING|"{Date}"
value1#9=STRING|"{Date}"
value2=STRING|"01-01-{Year}"
value2#1=STRING|"12-4-2020"
value2#10=STRING|"27-12-2019"
value2#2=STRING|"13-4-2020"
value2#3=STRING|"27-4-{Year}"
value2#4=STRING|"21-5-2020"
value2#5=STRING|"22-5-2020"
value2#6=STRING|"31-5-2020"
value2#7=STRING|"1-6-2020"
value2#8=STRING|"25-12-{Year}"
value2#9=STRING|"26-12-{Year}"

[Actions\Action12]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create global variable ""DATECHECK_HOLIDAY"" with value ""Yes"""
Params=FOLDER

[Actions\Action12\Params]
expand=STRING|"1"
varkind=STRING|"0"
varname=STRING|"DATECHECK_HOLIDAY"
varvalue=STRING|"Yes"

[Actions\Action13]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"

[Actions\Action14]
ActionID=STRING|"A_MISC_COMMENT"
Enabled=INTEGER|-1
Name=STRING|"PERSONNEL MEETING"
Params=FOLDER

[Actions\Action14\Params]
comment=STRING|"PERSONNEL MEETING"

[Actions\Action15]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action15\Params]
case=STRING|"0"
connection=STRING|"1"
count=STRING|"1"
operator=STRING|"0"
type=STRING|"2"
value1=STRING|"{Date}"
value2=STRING|"18-12-2019"

[Actions\Action16]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create global variable ""DATECHECK_PERSMEETING"" with value ""Yes"""
Params=FOLDER

[Actions\Action16\Params]
expand=STRING|"1"
varkind=STRING|"0"
varname=STRING|"DATECHECK_PERSMEETING"
varvalue=STRING|"Yes"

[Actions\Action17]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"

[Actions\Action18]
ActionID=STRING|"A_MISC_COMMENT"
Enabled=INTEGER|-1
Name=STRING|"PRODUCTION STOP"
Params=FOLDER

[Actions\Action18\Params]
comment=STRING|"PRODUCTION STOP"

[Actions\Action19]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action19\Params]
case=STRING|"0"
case#1=STRING|"0"
connection=STRING|"1"
count=STRING|"2"
operator=STRING|"0"
operator#1=STRING|"0"
type=STRING|"1"
type#1=STRING|"0"
value1=STRING|"{WeekOfTheYear({Date})}"
value1#1=STRING|"{WeekOfTheYear({Date})}"
value2=STRING|"30"
value2#1=STRING|"31"

[Actions\Action2]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create global variable ""DATECHECK_HOLIDAY"" with value ""No"""
Params=FOLDER

[Actions\Action2\Params]
expand=STRING|"1"
varkind=STRING|"0"
varname=STRING|"DATECHECK_HOLIDAY"
varvalue=STRING|"No"

[Actions\Action20]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create global variable ""DATECHECK_PRODSTOP"" with value ""Yes"""
Params=FOLDER

[Actions\Action20\Params]
expand=STRING|"1"
varkind=STRING|"0"
varname=STRING|"DATECHECK_PRODSTOP"
varvalue=STRING|"Yes"

[Actions\Action21]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"

[Actions\Action22]
ActionID=STRING|"A_MISC_COMMENT"
Enabled=INTEGER|-1
Name=STRING|"//LAST WORKDAY OF THE MONTH"
Params=FOLDER

[Actions\Action22\Params]
comment=STRING|"LAST WORKDAY OF THE MONTH"

[Actions\Action23]
ActionID=STRING|"A_SCRIPT_JSEVALUATE"
Enabled=INTEGER|-1
Name=STRING|"Check the last workday of current month"
Params=FOLDER

[Actions\Action23\Params]
expression=STRING|"lastBusinessDayOfMonth({Year}, {MonthNo})"
line00000000=STRING|"function lastBusinessDayOfMonth(year, month) {"
line00000001=STRING|"var date = new Date();"
line00000002=STRING|"var offset = 0;"
line00000003=STRING|"var result = null;"
line00000005=STRING|"if ('undefined' === typeof year || null === year) {"
line00000006=STRING|"year = date.getFullYear();"
line00000007=STRING|"}"
line00000009=STRING|"if ('undefined' === typeof month || null === month) {"
line0000000A=STRING|"month = date.getMonth();"
line0000000B=STRING|"}"
line0000000D=STRING|"do {"
line0000000E=STRING|"result = new Date(year, month, offset);"
line00000010=STRING|"offset--;"
line00000011=STRING|"} while (0 === result.getDay() || 6 === result.getDay());"
line00000013=STRING|"return result.getVarDate();"
line00000014=STRING|"}"
line00000016=STRING|"//LogMessage(lastBusinessDayOfMonth(2018, 4))"
linecount=STRING|"23"
loadfromfile=STRING|"1"
variable=STRING|"dt"

[Actions\Action24]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action24\Params]
case=STRING|"0"
connection=STRING|"0"
count=STRING|"1"
operator=STRING|"0"
type=STRING|"0"
value1=STRING|"{DateTimeToFormat({Date},dd-mm-yyyy)}"
value2=STRING|"{DateTimeToFormat({dt},dd-mm-yyyy)}"

[Actions\Action25]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create global variable ""DATECHECK_LASTWORKDAYOFMONTH"" with value ""Yes"""
Params=FOLDER

[Actions\Action25\Params]
expand=STRING|"1"
varkind=STRING|"0"
varname=STRING|"DATECHECK_LASTWORKDAYOFMONTH"
varvalue=STRING|"Yes"

[Actions\Action26]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"

[Actions\Action27]
ActionID=STRING|"A_MISC_COMMENT"
Enabled=INTEGER|-1
Name=STRING|"//FIRST WORKDAY OF THE MONTH"
Params=FOLDER

[Actions\Action27\Params]
comment=STRING|"FIRST WORKDAY OF THE MONTH"

[Actions\Action28]
ActionID=STRING|"A_SCRIPT_JSEVALUATE"
Enabled=INTEGER|-1
Name=STRING|"Check first workday of current month"
Params=FOLDER

[Actions\Action28\Params]
expression=STRING|"FirstBusinessDayOfMonth({Year}, {IncMonths(-1)})"
line00000000=STRING|"function FirstBusinessDayOfMonth(year, month)"
line00000001=STRING|"{"
line00000002=STRING|"  var date = new Date();"
line00000003=STRING|"  var offset = 1;"
line00000004=STRING|"  var result = null;"
line00000006=STRING|"  if ('undefined' === typeof year || null === year)"
line00000007=STRING|"  {"
line00000008=STRING|"    year = date.getFullYear();"
line00000009=STRING|"  }"
line0000000B=STRING|"  if ('undefined' === typeof month || null === month)"
line0000000C=STRING|"  {"
line0000000D=STRING|"    month = date.getMonth();"
line0000000E=STRING|"  }"
line00000010=STRING|"  do"
line00000011=STRING|"  {"
line00000012=STRING|"    result = new Date(year, month, offset);"
line00000013=STRING|"    offset++;"
line00000014=STRING|"  } while (0 === result.getDay() || 6 === result.getDay());"
line00000015=STRING|"  //while Saturday or Sunday"
line00000017=STRING|"  return result.getVarDate();"
line00000018=STRING|"}"
line0000001A=STRING|"//LogMessage(FirstBusinessDayOfMonth(2018, 8))"
linecount=STRING|"27"
loadfromfile=STRING|"1"
variable=STRING|"dt"

[Actions\Action29]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action29\Params]
case=STRING|"0"
connection=STRING|"0"
count=STRING|"1"
operator=STRING|"0"
type=STRING|"0"
value1=STRING|"{DateTimeToFormat({Date},dd-mm-yyyy)}"
value2=STRING|"{DateTimeToFormat({dt},dd-mm-yyyy)}"

[Actions\Action3]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create global variable ""DATECHECK_PERSMEETING"" with value ""No"""
Params=FOLDER

[Actions\Action3\Params]
expand=STRING|"1"
varkind=STRING|"0"
varname=STRING|"DATECHECK_PERSMEETING"
varvalue=STRING|"No"

[Actions\Action30]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create global variable ""DATECHECK_FIRSTWORKDAYOFMONTH"" with value ""Yes"""
Params=FOLDER

[Actions\Action30\Params]
expand=STRING|"1"
varkind=STRING|"0"
varname=STRING|"DATECHECK_FIRSTWORKDAYOFMONTH"
varvalue=STRING|"Yes"

[Actions\Action31]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"

[Actions\Action32]
ActionID=STRING|"A_MISC_COMMENT"
Enabled=INTEGER|-1
Name=STRING|"//LAST WORKDAY OF THE YEAR"
Params=FOLDER

[Actions\Action32\Params]
comment=STRING|"LAST WORKDAY OF THE YEAR"

[Actions\Action33]
ActionID=STRING|"A_SCRIPT_JSEVALUATE"
Enabled=INTEGER|-1
Name=STRING|"Check the last workday of current month"
Params=FOLDER

[Actions\Action33\Params]
expression=STRING|"lastBusinessDayOfMonth({Year}, {MonthNo})"
line00000000=STRING|"function lastBusinessDayOfMonth(year, month) {"
line00000001=STRING|"var date = new Date();"
line00000002=STRING|"var offset = 0;"
line00000003=STRING|"var result = null;"
line00000005=STRING|"if ('undefined' === typeof year || null === year) {"
line00000006=STRING|"year = date.getFullYear();"
line00000007=STRING|"}"
line00000009=STRING|"if ('undefined' === typeof month || null === month) {"
line0000000A=STRING|"month = date.getMonth();"
line0000000B=STRING|"}"
line0000000D=STRING|"do {"
line0000000E=STRING|"result = new Date(year, month, offset);"
line00000010=STRING|"offset--;"
line00000011=STRING|"} while (0 === result.getDay() || 6 === result.getDay());"
line00000013=STRING|"return result.getVarDate();"
line00000014=STRING|"}"
line00000016=STRING|"//LogMessage(lastBusinessDayOfMonth(2018, 4))"
linecount=STRING|"23"
loadfromfile=STRING|"1"
variable=STRING|"dt"

[Actions\Action34]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action34\Params]
case=STRING|"0"
case#1=STRING|"0"
connection=STRING|"0"
count=STRING|"2"
operator=STRING|"0"
operator#1=STRING|"0"
type=STRING|"0"
type#1=STRING|"2"
value1=STRING|"{DateTimeToFormat({Date},dd-mm-yyyy)}"
value1#1=STRING|"{MonthNo}"
value2=STRING|"{DateTimeToFormat({dt},dd-mm-yyyy)}"
value2#1=STRING|"12"

[Actions\Action35]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create global variable ""DATECHECK_LASTWORKDAYOFYEAR"" with value ""Yes"""
Params=FOLDER

[Actions\Action35\Params]
expand=STRING|"1"
varkind=STRING|"0"
varname=STRING|"DATECHECK_LASTWORKDAYOFYEAR"
varvalue=STRING|"Yes"

[Actions\Action36]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"

[Actions\Action37]
ActionID=STRING|"A_MISC_COMMENT"
Enabled=INTEGER|-1
Name=STRING|"FIRST WORKDAY OF THE YEAR"
Params=FOLDER

[Actions\Action37\Params]
comment=STRING|"FIRST WORKDAY OF THE YEAR"

[Actions\Action38]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Define first workday of year"
Params=FOLDER

[Actions\Action38\Params]
expand=STRING|"1"
varkind=STRING|"1"
varname=STRING|"FIRSTWORKDAYOFYEARDATES"
varvalue=STRING|"02-01-2020{EOL}04-01-2021{EOL}03-01-2022{EOL}02-01-2023{EOL}02-01-2024{EOL}02-01-2025{EOL}02-01-2026{EOL}04-01-2027{EOL}03-01-2028{EOL}02-01-2029{EOL}02-01-2030{EOL}02-01-2031{EOL}02-01-2032{EOL}03-01-2033{EOL}02-01-2034{EOL}02-01-2035{EOL}02-01-2036{EOL}02-01-2037{EOL}04-01-2038{EOL}03-01-2039{EOL}02-01-2040"

[Actions\Action39]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action39\Params]
case=STRING|"0"
connection=STRING|"0"
count=STRING|"1"
operator=STRING|"6"
type=STRING|"0"
value1=STRING|"{DateTimeToFormat({Date},dd-mm-yyyy)}"
value2=STRING|"{FIRSTWORKDAYOFYEARDATES}"

[Actions\Action4]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create global variable ""DATECHECK_PRODSTOP"" with value ""No"""
Params=FOLDER

[Actions\Action4\Params]
expand=STRING|"1"
varkind=STRING|"0"
varname=STRING|"DATECHECK_PRODSTOP"
varvalue=STRING|"No"

[Actions\Action40]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create global variable ""DATECHECK_FIRSTWORKDAYOFYEAR"" with value ""Yes"""
Params=FOLDER

[Actions\Action40\Params]
expand=STRING|"1"
varkind=STRING|"0"
varname=STRING|"DATECHECK_FIRSTWORKDAYOFYEAR"
varvalue=STRING|"Yes"

[Actions\Action41]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"

[Actions\Action42]
ActionID=STRING|"A_DIALOG_QUESTION"
Enabled=INTEGER|-1
Name=STRING|"Question Dialog"
Params=FOLDER

[Actions\Action42\Params]
abortif=STRING|"1"
action=STRING|"0"
autotime=STRING|"2"
buttons=STRING|"1"
message=STRING|"""So, {Date} has the following properties:"",,""Holiday: {DATECHECK_HOLIDAY}"",""Pers Meeting: {DATECHECK_PERSMEETING}"",""Productionstop: {DATECHECK_PRODSTOP}"",""Last workday of "",""month: {DATECHECK_LASTWORKDAYOFMONTH}"",,""Last workday of year: {DATECHECK_LASTWORKDAYOFYEAR}"",""First workday of month: "",{DATECHECK_FIRSTWORKDAYOFMONTH},""First workday of year: {DATECHECK_FIRSTWORKDAYOFYEAR}"",,""This message will close itself. See counter below."""
time=STRING|"10"

[Actions\Action5]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create global variable ""DATECHECK_LASTWORKDAYOFMONTH"" with value ""No"""
Params=FOLDER

[Actions\Action5\Params]
expand=STRING|"1"
varkind=STRING|"0"
varname=STRING|"DATECHECK_LASTWORKDAYOFMONTH"
varvalue=STRING|"No"

[Actions\Action6]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create global variable ""DATECHECK_LASTWORKDAYOFYEAR"" with value ""No"""
Params=FOLDER

[Actions\Action6\Params]
expand=STRING|"1"
varkind=STRING|"0"
varname=STRING|"DATECHECK_LASTWORKDAYOFYEAR"
varvalue=STRING|"No"

[Actions\Action7]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create global variable ""DATECHECK_FIRSTWORKDAYOFYEAR"" with value ""No"""
Params=FOLDER

[Actions\Action7\Params]
expand=STRING|"1"
varkind=STRING|"0"
varname=STRING|"DATECHECK_FIRSTWORKDAYOFYEAR"
varvalue=STRING|"No"

[Actions\Action8]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create global variable ""DATECHECK_FIRSTWORKDAYOFMONTH"" with value ""No"""
Params=FOLDER

[Actions\Action8\Params]
expand=STRING|"1"
varkind=STRING|"0"
varname=STRING|"DATECHECK_FIRSTWORKDAYOFMONTH"
varvalue=STRING|"No"

[Actions\Action9]
ActionID=STRING|"A_VARIABLES_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create global variable ""DATECHECK_FIRSTWORKDAYOFMONTH"" with value ""No"""
Params=FOLDER

[Actions\Action9\Params]
expand=STRING|"1"
varkind=STRING|"0"
varname=STRING|"DATECHECK_FIRSTWORKDAYOFMONTH"
varvalue=STRING|"No"

[Events]
Event1=FOLDER

[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_GENERAL_SHEDULER"
Name=STRING|"Scheduler(23-5-2019 00:01:00)"
Params=FOLDER
UniqueID=INTEGER|1860671103

[Events\Event1\Params]
periodicity=STRING|"1"
periodparameter=STRING|"1111111"
periodparameter2=STRING|"11111"
startdate=STRING|"42425"
time0=STRING|"60000"
timecount=STRING|"1"
wakeup=STRING|"0"