Scheduler

Discuss RoboTask here
Post Reply
hs1972
Posts: 9
Joined: Fri Jun 13, 2014 8:09 pm

Scheduler

Post by hs1972 »

How would you set the scheduler up so it triggered every last Saturday in the month?

Many thanks.
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Scheduler

Post by Oleg »

See example below.

Code: Select all

[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1416408852
Comment=STRINGLIST
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task119"
Hide=INTEGER|0
ID=INTEGER|161569533
LogOnAsUser=INTEGER|1
Name=STRING|"Last Saturday of the Month"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0

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

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

[Actions\Action1\Params]
case=STRING|"0"
operator=STRING|"0"
type=STRING|"1"
value1=STRING|"{DayOfWeekNo}"
value2=STRING|"7"

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

[Actions\Action2\Params]
case=STRING|"0"
operator=STRING|"1"
type=STRING|"1"
value1=STRING|"{MonthIncDays(7)}"
value2=STRING|"{MonthNo}"

[Actions\Action3]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""Place here your own code"""
Params=FOLDER

[Actions\Action3\Params]
icon=STRING|"1"
msg0=STRING|"Place here your own code"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"

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

[Actions\Action5]
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
UnigueID=INTEGER|16445953

[Events\Event1\Params]
periodicity=STRING|"2"
periodparameter=STRING|"00000000000000000000011111111110"
startdate=STRING|"41820"
time0=STRING|"36000000"
timecount=STRING|"1"
wakeup=STRING|"0"
You should schedule the task on "Every month" basis at 22-31 days.

in the task you should check the day.
The condition "The Last Saturday of the month" requires two conditions:
- this day must be Saturday: {DayOfWeekNo} = 7
- if you calculate the month 7 days later it will be another month: {MonthIncDays(7)} <> {MonthNo}
Oleg Yershov
hs1972
Posts: 9
Joined: Fri Jun 13, 2014 8:09 pm

Re: Scheduler

Post by hs1972 »

Many thanks Oleg.
Post Reply