Randomly Scheduling A Task

Discuss RoboTask here
Post Reply
julian926
Posts: 4
Joined: Tue Jan 15, 2013 1:01 am
Location: United States

Randomly Scheduling A Task

Post by julian926 »

Newbie here. How does someone randomly schedule a task
from, say, 9:00 - 9:30 am?

Thank you!

Julian
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Randomly Scheduling A Task

Post by Oleg »

What do you want to get exactly?
- Run once or several times between 9:00 to 9:30;
- Why do you not want to use ordinary scheduler?
julian926
Posts: 4
Joined: Tue Jan 15, 2013 1:01 am
Location: United States

Randomly Scheduling A Task

Post by julian926 »

Thanks for the reply. I want to run every day.

I had thought robotask has some kind of randomizer and the
ability to schedule. Am I wrong?

Thanks!
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Randomly Scheduling A Task

Post by Oleg »

You can put random pause at the beginning of the task.

See the example below:
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************

[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|2099193306
Comment=STRINGLIST
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task72"
Hide=INTEGER|0
ID=INTEGER|1416894126
LogOnAsUser=INTEGER|1
Name=STRING|"Random schedule"
OnErrorTaskID=INTEGER|0
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0

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

[Actions\Action1]
ActionID=STRING|"A_LOOP_SIMPLE"
Enabled=INTEGER|-1
Name=STRING|"Simple Loop"
Params=FOLDER

[Actions\Action1\Params]
begin=STRING|"1"
end=STRING|"{RandomValue(60)}"

[Actions\Action2]
ActionID=STRING|"A_GENERAL_PAUSE"
Enabled=INTEGER|-1
Name=STRING|"Delay 15000 ms"
Params=FOLDER

[Actions\Action2\Params]
delay=STRING|"150"

[Actions\Action3]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"

[Actions\Action4]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""[{Time}, {DayOfWeek}, {Date}]"""
Params=FOLDER

[Actions\Action4\Params]
icon=STRING|"1"
msg0=STRING|"[{Time}, {DayOfWeek}, {Date}]"
msg1=STRING|"Hey, awake!"
msg3=STRING|"(do something here)"
msgcount=STRING|"4"
playsound=STRING|"0"
showmessage=STRING|"1"

[Events]
Event1=FOLDER

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

[Events\Event1\Params]
id=STRING|"1OKQK185"
periodicity=STRING|"0"
startdate=STRING|"41289"
time0=STRING|"32400000"
timecount=STRING|"1"
julian926
Posts: 4
Joined: Tue Jan 15, 2013 1:01 am
Location: United States

Randomly Scheduling A Task

Post by julian926 »

Thanks again! Dumb question - where can I view it in code
view?
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Randomly Scheduling A Task

Post by Oleg »

Save the text of the task to a file and use menu Task => Import in order to import the task into RoboTask.
Post Reply