option to launch or skip the suspended tasks

Discuss RoboTask here
Post Reply
leopoldus
Posts: 20
Joined: Fri Oct 22, 2010 11:22 pm

option to launch or skip the suspended tasks

Post by leopoldus »

All RoboTask tasks, which were suspended while the computer was shut off or in sleeping mode etc, start immediately after the computer is in working station again. But for some tasks it is not reasonable behavior. Say, I have a task to shut the computer at 02:00 at night. But if my computer was sleeping at 02:00 and I awake it at 09:00 at morning, this postponed task from 02:00 launches now and shut the computer off. As one can guess, it is not the think I actually need.

Is there any solution for such situations? Say, some option to allow/forbid Robotask to start suspended tasks after their original time or skip them till the next time?

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

Re: option to launch or skip the suspended tasks

Post by Oleg »

I think you mean Scheduler trigger.
You are right: if trigger missed one (or more) time-points it try to start the task in as soon as possible.
For example you schedule the task at 2:00 am but you computer was in sleep or hibernate mode at this time.
The task will start immediately when you wake up the computer.

Now you can put the time verification at the beginning of the task.
like this:

Code: Select all

if {time} > 8:00 then
  if {time} < 20:00 then
    break
  end if
end if
In this case the main code of the task will be being executed only from 20:00 to 8:00

Thank you for the report. We'll investigate the problem and will make necessary changes.
Oleg Yershov
leopoldus
Posts: 20
Joined: Fri Oct 22, 2010 11:22 pm

Re: option to launch or skip the suspended tasks

Post by leopoldus »

Oleg wrote:Now you can put the time verification at the beginning of the task.
like this:

Code: Select all

if {time} > 8:00 then
  if {time} < 20:00 then
    break
  end if
end if
In this case the main code of the task will be being executed only from 20:00 to 8:00
I'm not sure, where should one add this code? :? As much as I can see, there is no a such option in RoboTask GUI. Do you mean any configuration file it its work folder? Sorry for my stupidness, I'm a novice with your app.
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: option to launch or skip the suspended tasks

Post by Oleg »

Look at this example:

Code: Select all

;*****************************
;* 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
ExternalName=STRING|"Task289"
Hide=INTEGER|0
ID=INTEGER|934025350
LogOnAsUser=INTEGER|1
Name=STRING|"limit working time"
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
Action5=FOLDER
Action6=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|"3"
type=STRING|"2"
value1=STRING|"{Time}"
value2=STRING|"8:00"

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

[Actions\Action2\Params]
case=STRING|"0"
operator=STRING|"5"
type=STRING|"2"
value1=STRING|"{Time}"
value2=STRING|"20:00"

[Actions\Action3]
ActionID=STRING|"A_LOOP_BREAK"
Enabled=INTEGER|-1
Name=STRING|"Break"

[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"

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

[Actions\Action6\Params]
icon=STRING|"1"
msg0=STRING|"[{Time}, {DayOfWeek}, {Date}]"
msg1=STRING|"This is an example of main code"
msg2=STRING|"Place your code here"
msgcount=STRING|"3"
playsound=STRING|"0"
showmessage=STRING|"1"

[\Comment]
s1=This example shows how to limit working time of the task.
s2=Main code of this task will not work between 08:00 and 20:00
Save the text of the task into a file and use menu Task -> Import to import the task into RoboTask
Oleg Yershov
leopoldus
Posts: 20
Joined: Fri Oct 22, 2010 11:22 pm

Re: option to launch or skip the suspended tasks

Post by leopoldus »

Oleg wrote:I think you mean Scheduler trigger.
You are right: if trigger missed one (or more) time-points it try to start the task in as soon as possible.
...
Thank you for the report. We'll investigate the problem and will make necessary changes.
HI! This is your comment 3 months ago... Do you still consider adding the related feature to RoboTask or have refused from this thought?
Thanks.
Post Reply