I think that there are two ways:
1. Create another task which disable your task at 12:00 and enable again at 13:00. See actions Enable Task & Disable Task (in Task Commands group)
2. Use If..Then action in the task
Algorithm will be like this:
If {Time}>"12:00" then
If {Time}<"13:00" then
Break
EndIf
EndIf
.....
Your code here
.....
Thus, if the time between 12:00 and 13:00 your task will be cancelled before executing of main code.
IMHO, 2-nd way is simpler and more clear
any option to omit the next run?
any option to omit the next run?
Hi Oleg,
Thank you for your explanation. However I see now, that I was not specific enough to explain my problem. Sorry for it and let me try again.
The situation with current time 11:45 and next task planned for 12:00 was only the example. Actually my question was, is it possible to disable the NEXT task. Say I've the macro ABC, which starts the files XYZ every hour at 00 minutes. Now is 11:45. I start the special macro whit the name “ABC-disabler” and it disables the NEXT instance of ABC macro, so the macro ABC will not be started at 12:00 and the next instance will occur at 13:00.
But if now is 18:20 and I start the macro ABC-disabler, I need, that, again, the NEXT instance of the macro ABC will be omitted. It means that the macro ABC will not be started the next time at 19:00, but at 20:00.
Your suggestion does not do it. If I try to accommodate any of your two solutions in order to solve this problem, I'd need to create at least 24 different ABC-disabler macros, one for every hour of the day. Furthermore, I will need then to select every time, which of them 24 macros I should run depending of the current time. It does not seem to be very convenient, does it?
Thank you for your explanation. However I see now, that I was not specific enough to explain my problem. Sorry for it and let me try again.
The situation with current time 11:45 and next task planned for 12:00 was only the example. Actually my question was, is it possible to disable the NEXT task. Say I've the macro ABC, which starts the files XYZ every hour at 00 minutes. Now is 11:45. I start the special macro whit the name “ABC-disabler” and it disables the NEXT instance of ABC macro, so the macro ABC will not be started at 12:00 and the next instance will occur at 13:00.
But if now is 18:20 and I start the macro ABC-disabler, I need, that, again, the NEXT instance of the macro ABC will be omitted. It means that the macro ABC will not be started the next time at 19:00, but at 20:00.
Your suggestion does not do it. If I try to accommodate any of your two solutions in order to solve this problem, I'd need to create at least 24 different ABC-disabler macros, one for every hour of the day. Furthermore, I will need then to select every time, which of them 24 macros I should run depending of the current time. It does not seem to be very convenient, does it?
Last edited by leopoldus on Tue Feb 07, 2012 11:45 pm, edited 1 time in total.
any option to omit the next run?
Well, does in mean, that there is no any solution for my problem?
any option to omit the next run?
You can use execution of the task with condition.
Like this:
If {AllowToRun} then
.....
main code of the task
....
Else
Set variable AllowToRun=True
End if
AllowToRun is global user variable of RoboTask. You can set initial value to TRUE here:
menu Options->Variables->User Variables
In main code of the task you can set AllowToRun to false. This means that the next run of this task will be omited. But only next run, because the variable value will be TRUE again
Like this:
If {AllowToRun} then
.....
main code of the task
....
Else
Set variable AllowToRun=True
End if
AllowToRun is global user variable of RoboTask. You can set initial value to TRUE here:
menu Options->Variables->User Variables
In main code of the task you can set AllowToRun to false. This means that the next run of this task will be omited. But only next run, because the variable value will be TRUE again