QuerySurge has always had the concept of scheduling. Users were able to create a Scenario, with the option of executing the Scenario immediately or choosing a future date and time for the Scenario to run. With the release of QuerySurge 9.2, we've introduced the concept of Recurring Schedules. Users can now create Scenarios that execute on a recurring basis, which has until now, only been achievable with external scripting tools via our APIs.
Creating a Recurring Schedule
You can create a Recurring Schedule by launching the Schedule Scenario wizard from either the Scheduling view or the Run Dashboard. The wizard is flexible, and allows for the creation of recurrence-based or one-time executions. We'll, of course, be focusing on recurring executions in this article.
Launching the Wizard
You can launch the Schedule Scenario wizard from a number of places within the application.
- Navigate to the Scheduling view.
- From the Test Suites tab, use the button to launch the wizard.
- From the Recurring Schedules tab, use the button to launch the wizard.
- Navigate to the Run Dashboard view.
- Use the same button to launch the wizard.
- Select the Schedule Scenario option from either the Scheduling or Run Dashboard global header dropdown menu.
- With the wizard open, select the Recurring radio button and click the button. Please note, the button supports a dropdown menu (using the arrow on the right). You can open this menu and choose Recurring Schedule to bypass the Schedule Type selection screen.
Using the Wizard
The wizard supports five different Schedule types, each of which is entirely customizable.
- Daily
- Weekly
- Monthly
- Yearly
- Custom Interval
Daily Schedules
A daily Schedule is intended to execute once per day at a specified time. That being said, it can be configured to behave in more complex ways.
- Type your desired name in the Schedule Name textbox.
- Select Daily from the Trigger Type dropdown menu.
- Specify your frequency. For a daily Schedule, this means deciding how often (i.e., a number of days) and at what time the trigger should fire.
- Choose the days on which this Schedule will execute. By default, a daily Schedule will run every day; however, you can uncheck days as needed. A common use case might be to uncheck Saturday and Sunday to exclude weekend executions.
- Select the date on which your Schedule should begin executing.
- Specify how and when your Schedule should end.
- Select the End on radio button if you wish to configure your Schedule to finish executing on a particular date (note, your final execution will be on this date).
- Select the End after radio button if you wish to configure your Schedule to finish executing after a specified number of runs.
- Select the No end date radio button if you don't want your Schedule to end at all.
- Click the button.
Weekly Schedules
A weekly Schedule is intended to execute once per week, on a specified day and at a specified time. That being said, it can be configured to behave in more complex ways.
- Type your desired name in the Schedule Name textbox.
- Select Weekly from the Trigger Type dropdown menu.
- Specify your frequency. For a weekly Schedule, this means deciding how often (i.e., a number of weeks), at what time, and on what days the trigger should fire.
- Select the date on which your Schedule should begin executing.
- Specify how and when your Schedule should end.
- Select the End on radio button if you wish to configure your Schedule to finish executing on a particular date (note, your final execution will be on this date).
- Select the End after radio button if you wish to configure your Schedule to finish executing after a specified number of runs.
- Select the No end date radio button if you don't want your Schedule to end at all.
- Click the button.
Monthly Schedules
A monthly Schedule is intended to execute once per month, either on a specific date or a certain day of the week in that month.
- Type your desired name in the Schedule Name textbox.
- Select Monthly from the Trigger Type dropdown menu.
- Specify your frequency. For a monthly Schedule, this means deciding how often (i.e., a number of months), at what time, and on what date or day of the week the trigger should fire.
- When using the day-of-week option, you choose a specific day (Monday through Sunday) and ordinal (first through last week) of each month.
- When using the date option, you enter a numeric date for each month.
- Select the date on which your Schedule should begin executing.
- Specify how and when your Schedule should end.
- Select the End on radio button if you wish to configure your Schedule to finish executing on a particular date (note, your final execution will be on this date).
- Select the End after radio button if you wish to configure your Schedule to finish executing after a specified number of runs.
- Select the No end date radio button if you don't want your Schedule to end at all.
- Click the button.
Yearly Schedules
A yearly Schedule is intended to execute once per year, either on a specific date or a certain day of the month in that year.
- Type your desired name in the Schedule Name textbox.
- Select Yearly from the Trigger Type dropdown menu.
- Specify your frequency. For a yearly Schedule, this means deciding how often (i.e., a number of years), at what time, and on what date or day of the month the trigger should fire.
- When using the day-of-month option, you choose a specific day (Monday through Sunday), month, and ordinal (first through last day-of-week) of each month.
- When using the date option, you enter an exact date for each year.
- Select the date on which your Schedule should begin executing.
- Specify how and when your Schedule should end.
- Select the End on radio button if you wish to configure your Schedule to finish executing on a particular date (note, your final execution will be on this date).
- Select the End after radio button if you wish to configure your Schedule to finish executing after a specified number of runs.
- Select the No end date radio button if you don't want your Schedule to end at all.
- Click the button.
Custom Interval Schedules
A custom interval Schedule is intended to execute on an interval basis of less than 24 hours.
- Type your desired name in the Schedule Name textbox.
- Select Yearly from the Trigger Type dropdown menu.
- Specify your frequency. For a custom interval Schedule, this means deciding how often (i.e., a number of hours and minutes) the trigger should fire.
- The minimum frequency is 5 minutes, and the maximum is 23 hours and 59 minutes.
- Select the date on which your Schedule should begin executing.
- Specify how and when your Schedule should end.
- Select the End on radio button if you wish to configure your Schedule to finish executing on a particular date (note, your final execution will be on this date).
- Select the End after radio button if you wish to configure your Schedule to finish executing after a specified number of runs.
- Select the No end date radio button if you don't want your Schedule to end at all.
- Click the button.
Scenario Settings
After configuring your Schedule details, the next step is to setup and attach a Scenario.
- Type your desired name in the Scenario Name textbox.
- Optionally, select an Agent to execute this Schedule.
- Optionally, assign Asset Tags to this Schedule.
- Use the button to add Test Suites to your Scenario.
- Click the button.
Managing Recurring Schedules
You can view and manage existing schedules from the Recurring Schedules grid. Simply navigate to the Scheduling view, and select the Recurring Schedules tab.
The grid contains pertinent high-level information about each schedule.
- ID
- Name
- Type (one of the five available trigger types)
- # of Suites (how many Test Suites are attached to the underlying Scenario)
- Last Updated
- Updated by
- Latest Run (the date and time the Schedule last executed, or blank if it hasn't yet)
- Status
Schedule Status
There are five possible statuses that a Schedule can have.
- Active is the default status; a Schedule runs normally while in this status.
- Inactive is the temporary status of a copied Schedule before it's activated.
- Paused is a manually set status that explicitly halts executions.
- Completed indicates that the Schedule is finished all of its executions.
- Disabled indicates that all Test Suites attached to a Schedule have been deleted.
Please note that even if paused, a Schedule slated to end on a specific date will still do so when that end date is reached. Pausing a Schedule does not impact its end date.
Grid Options
There are several options available to you through the grid, both as header buttons and context menus.
- Create
- Edit
- Copy
- Delete
- Pause (or Resume)
- Run Now
We've already gone over creating Schedules, so we're going to focus on editing, copying, deleting, pausing (or resuming), and running Schedules.
Editing a Schedule
To open a Schedule for editing, select the Schedule in question and click the button. Alternatively, double-clicking a Schedule or right-clicking one and selecting the Edit menu option will do the same. With the Schedule open, you can modify any of the properties initially configured during creation.
You can view or modify any of the original settings. Additionally, this view offers a Future Executions section, which updates as you modify the recurrence of the Schedule. This gives you a clearer picture of how your changes will impact the Schedule. After making your desired changes, you can persist them using the button.
In addition to the Schedule Properties tab, shown above, there are two other tabs available from this panel: the History tab, and the Execution History tab. The History tab shows a chronological list of modifications made to the Schedule.
Double-click any of the entries (or right-click one and select the Open menu option) to view the historical change revision at that point in time.
Lastly, the Execution History tab shows a chronological list of executions, including the Scenario name, how many Test Suites were in the Scenario, who initially scheduled the execution, when it executed, and what the outcome was.
Copying a Schedule
To copy a Schedule, select the Schedule in question and click the button. Alternatively, right-click a Schedule and select the Copy menu option. A modal will appear where you can enter a name for your to-be-copied Schedule (or accept the default name).
- Type your desired name in the textbox (or accept the default value).
- Click the button.
Once the copy is created, it'll appear in the Recurring Schedules grid. Initially, it'll be given a status of Inactive. You'll need to open it for editing, adjust the settings (most notably, the start date) as needed, and click the button.
Deleting a Schedule
To delete a Schedule, select the Schedule in question and click the button. Alternatively, right-click a Schedule and select the Delete menu option. A confirmation modal will appear where you'll need to click the button to confirm your intended action.
Pausing or Resuming a Schedule
To pause (or resume) a Schedule, select the Schedule in question and click either the button or button, respectively. Alternatively, right-click a Schedule and select either the Pause menu option or Resume menu option, respectively. A confirmation modal will appear where you'll need to click the button to confirm your intended action. Please note, that only Active Schedules may be paused and Paused Schedules may be resumed. If a Schedule is in any other state—Completed, Disabled, or Inactive—these options will be unavailable.
Unscheduled Executions
In addition to regularly scheduled executions, you may wish to trigger an unscheduled, one-off execution. To do so, select the Schedule in question and click the button. Alternatively, right-click a Schedule and select the Run Now menu option. A confirmation modal will appear asking you to confirm your intention.
As the modal explains, Run Now executions do not impact the recurrence or pending executions of the Schedule itself. The execution count won't be affected, and these runs won't appear on the Execution History tab.
After clicking the button, you'll be automatically redirected to the Run Dashboard where you can view the progress and statistics of your execution.
Comments
0 comments
Please sign in to leave a comment.