The Scheduler

From UBot Studio
Jump to: navigation, search

The UBot Studio Scheduler is a Professional Edition and Developer Edition feature that allows the scheduling of defined commands within UBot Studio.

The Scheduler can be found in the View Menu of UBot Studio.

The Run on Schedule button is used to activate a scheduled defined command.


Example 1 - Scheduling Within UBot Studio

define Navigate to Google {
    navigate("google.com", "Wait")
}


The command the define command creates is called "Navigate to Google " To schedule the simple defined command above, open the Scheduler and double click and time and date within the calender.

In the Schedule Event window that appears, fill out the needed information.


Scheduler.jpg


Event: Refers to the defined command being run. Click the drop down list will display all the defined commands in your script.

Date: The desired date and time the defined command will be run. The drop down arrow will display a smaller calender where a date and time can be selected.

Repeat: Clicking the checkbox for this criteria will run the defined command at the specified time and date, and repeat the process according the frequency specified.

Frequency: Criteria is activated when the Repeat check box is selected. Allows the scheduled command to run according to a determined number of minutes, hours, days, or weeks starting from the scheduled date.

After clicking OK in the Schedule event window as well as Scheduler window, click the Run on Schedule button on the Toolbar


Scheduler0.jpg


The selected defined command named "Navigate to Google" will run at the specified time and date, and if the repeat checkbox is selected, repeat at the frequency that was designated.

To stop the schedule defined command from running, simply click the Stop button on the toolbar.


Example 2 - Scheduling With A Compiled Bot

First, create a defined command with the tasks that will need to run on a schedule.

Here we have a simple define command that increments a variable


ui stat monitor("Runs:", #test)
on load("Bot Loaded") {
    set(#test, 0, "Global")
}
define test {
    increment(#test)
}


After creating the script with the define command define command, go to the file menu and select Compile.

Click the check box next to the define command that will need to be scheduled.


Schedulebot.gif


Once the bot is compiled, notice that a Run on Schedule button has appeared on the bot's interface.

To schedule your define command, click the tools menu and select Scheduler option.


Schedulebot0.gif


Double click a date and time on the calender and a small window will pop up to allow you to modify the following settings:

Event: The defined command that will be running on the schedule

Date: The date as well as the time the scheduled command will be running on

Repeat: Repeatedly runs the bot starting from the date and time scheduled

Frequency: Controls the frequency at which a scheduled command is repeated (every 2 minutes, every 2 hours, every 2 days, etc.)


Schedulebot1.gif

In this example, the bot is schedule a few minutes into the future and repeated every 2 minutes from that date and time.

After setting the event, time, repeat and frequency, click ok to return to the calender.

Notice that the scheduled command appears on the calender.

Click ok on the scheduler to return to the bot.

Click the Run on Schedule button on the bot, and your bot will run on the assigned schedule.

The UI will update with a new incremented value each time the bot runs.

Please keep the bot open after clicking the Run on Schedule button.

To stop a scheduled event, simply click the Stop button on the bot.


Schedulebot2.gif

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox