Scheduling Badboy Scripts

If you need to monitor your website or application or perform any kind of regular task using Badboy then you can take advantage of Badboy's scheduling functions. Scheduling allows you to program Badboy to run at a future time and date you specify, if you like, at repeating intervals.

Scheduling Manually

If you want to set up a schedule for your script to run based on fixed criteria then you can do this simply using the Schedule button on the Toolbar. The figure below shows this button:

When you click the Schedule button Badboy will create a Task in the Windows Task Scheduler that is pre-configured to run your Badboy script. Badboy then shows the properties box for the Schedule so that you can set the times you want the task to run.

Badboy schedules scripts using the Windows Task Scheduler. In order for Scheduling to work, therefore, you need to have the Task Scheduler component installed and it must be accessible from the user account that is running Badboy. If you don't have this component installed then Badboy will show an error message when you try to use the Scheduling features.

In the Schedule Task properties dialog you can set when you want your Badboy Script to run. You can choose to have it repeat at various different intervals. The figure below shows how this looks:

If you want to run your script more than once per day (eg. every 30 minutes, for example) click the "Advanced" button to choose this option.


Scheduling as Part of your Script

Sometimes you may want to schedule scripts based on dynamic behaviour - for example, if your ordering system takes 30 minutes to process an order you might want to schedule a test to check the order 30 minutes after your "Create Order" test runs. Of course you would only want the check to occur if your prior test has succeeded. Badboy's dynamic scheduling feature allows you to incorporate this kind scheduling as part of your Scripts.

To perform dynamic scheduling, drag a Schedule Item from the Toolbox into your Script. The figure below shows how the Schedule Item appears:

To set the delay time before the script runs, open the Schedule Item properties and choose "Later" in the Schedule options and choose the time you want the Scheduler to wait before it runs the script.

Badboy will not pause playing to wait for a Script that is scheduled later. It will schedule the script as a Task and continue running the current script.

You can include variable references in the "hours" and "minutes" fields if you want to schedule for an amount of time that depends on other outputs from your script.

Deleting a Schedule

Badboy does not provide a built in feature for deleting a scheduled script execution. Instead, you can easily delete tasks by using the features built into the operating system. To delete a task that you have scheduled:

  • Choose "Settings=>Control Panel" on your Start Menu
  • Double click on the "Scheduled Tasks" icon
  • Identify the Badboy task and delete it by right-clicking and choosing "Delete".

Badboy tasks are always named "Badboy Schedule". Items scheduled by Schedule Items in your Script are named with a number that starts with the Id of the Schedule Item that created them (you can find the id by looking at the properties for the Schedule Item in your script.)


Badboy Documentation Generated on Mon Dec 29 22:28:42 EST 2008