Schedules
Required role | Campaign Execution |
Access | CodeChecker Server → Campaign Execution → Schedules |
Schedules are used to automatically create and launch campaigns, at a specified date and time or at a specified interval of time. Schedules can be defined to create one campaign at a later date, or to create multiple campaigns over time, following a recurring schedule.
This chapter describes how to create and manage campaign schedules. For more information about manually creating and launching campaigns, refer to Campaigns.
The Schedules view is accessed from the Campaign Execution node in the Navigator.
Enter any combination of the above search criteria, then click the Search button to display the results. To display the complete list, click the Search button without entering any search criteria.
If a schedule has been started, its Status is Started. If a schedule has not been started yet, has been stopped or is finished, its Status is Stopped.
The Next Run column displays the next date and time the schedule will be executed. The Last Run column displays the most recent date and time the schedule was executed.
The Last Result column displays the most recent campaign status. The campaign status can either be OK or one of the failure levels: NOTICE, WARNING, or FATAL.
Follow the subsequent steps to create a new schedule.
Step 1 To access the Create Schedule wizard, either click the Create icon in the toolbar of the Schedules search view, or right-click anywhere in the list and select Create Schedule.
Step 2 Define the schedule's Code and Name. These values are required to create a new schedule. The Code cannot be changed once the schedule is created, but the Name can be edited later.
Step 3 Select a Code Review from the drop-down list. This value is required and cannot be edited once the schedule is created.
When the scheduled campaign is launched, the rule sets defined in the selected code review will be executed on the associated target.
Step 4 Select a Target from the drop-down list. This value is required and cannot be edited once the schedule is created.
When the scheduled campaign is launched, the code review will be carried out on the selected target application.
Click Finish.
Result The new schedule is created and its editor opens automatically. It is displayed in the search list in the Schedules search view.
It is required to edit new schedules before using them.
To open a schedule's editor, locate the schedule in the Schedules search view, then either:
- double-click on the item in the view,
- right-click on the item in the view and select Edit, or
- select the item in the view and click the Edit icon in the toolbar.
Save the changes (, Ctrl+S
or File > Save).
- Code
- This field displays the schedule's unique ID defined when the schedule was created. Once a schedule is created, it is not possible to edit this code.
- Name
- The schedule's name should reflect the context of the campaigns that will automatically be created and launched to be easily identified.
- Description
- Use this description to give as many details as possible about the type of schedule used to create campaigns.
- Code Review
- This field displays the code review selected when the schedule was created.
- Target
- This field displays the target selected when the schedule was created.
- Scheduled by
- This link displays the user that created the scheduled campaign. Click the link to see the user profile.
- Activated
-
When this box is checked, the schedule will restart automatically every time the CodeChecker Server starts.
Schedules must be started once to be considered active and to start running. If the CodeChecker Server is stopped, all the schedules will be stopped as well. When the server is started again, schedules with the Activated box checked will automatically start and run accordingly, without having to open the CodeChecker Studio and manually start them.
ReferenceFor more information about starting and stopping schedules, refer toStarting and stopping schedules.
- Default Scheduled Campaign Code
-
Define the default code to assign to every campaign created by the schedule, if it is set to repeat. This code will be the scheduled campaign's ID.
This default code should clearly reflect the schedule to make tracking each of the campaigns it creates easier, and to easily identify which campaigns were created by a schedule and which were created manually.
Use the variable
$i
in this field to track the number of scheduled campaigns created. The variable is incremented by one every time a new scheduled campaign is created by the schedule, if it is set to repeat. - Type
-
Select the type of schedule to run from the drop-down list.
Each type has a different set of parameters to define. Use the Scheduled Campaign Execution Information field on the right to ensure the defined parameters are correct.
OnceLaunch the scheduled campaign one time. Select a date and time in the future to automatically launch the scheduled campaign.
PeriodicLaunch scheduled campaigns following an interval of time defined by a Cron Expression. Enter a cron expression in the field to create a scheduling pattern or select one of the presets cron expressions. Once the schedule is started, the campaign will be launched when the parts in its scheduling pattern will be true at the same time.
The frequency is defined by crontab-like rules.
- Minutes sub-pattern: on which minute of the hour should the task be launched? The values range from 0 to 59.
- Hours sub-pattern: on which hour of the day should the task be launched? The values range from 0 to 23.
- Days of month sub-pattern: on which days of the month should the task be launched? The values range from 1 to 31. The special value "L" can be used to recognize the last day of the month.
- Months sub-pattern: during which months of the year should the task be launched? The values range from 1 (January) to 12 (December). The aliases jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov and dec can also be used.
- Days of week sub-pattern: on which days of the week should the task be launched? The values range from 0 (Sunday) to 6 (Saturday). The aliases sun, mon, tue, wed, thu, fri and sat can also be used.
NoteThe asterisk wild-card character * is also recognized, indicating "every minute of the hour", "every hour of the day", "every day of the month", "every month of the year" and "every day of the week", according to the sub-pattern in which it is used.
ReferenceFor more information about this scheduling pattern, refer to this website
- Scheduled Campaign Execution Information
- This box displays a translation in real text of the parameters defined for the Type of schedule. If there is an error, the box turns red to indicate that the schedule is invalid.
- Next Scheduled Campaigns (max. 5)
- This field displays the date and time of the next five scheduled campaigns, if it is set to repeat and depending on the defined schedule.
After creating a schedule, it must be started before the first scheduled campaign can be created and launched. Follow the subsequent steps to start a schedule.
Step 1 Locate the schedule in the Schedules search view.
Step 2 Either right-click on the item in the view and select Start, or select the item in the view and click the Start icon in the toolbar.
Click OK.
Result The schedule is started. When the date and time defined in the schedule arrive, a new campaign will be automatically created and launched.
If they are set to repeat, started schedules will continue to create new campaigns and launch them until they are stopped.
To stop a schedule, either right-click on the item in the Schedules search view and select Stop, or select the item and click the Stop icon in the toolbar. Click OK to confirm.
Schedules can be started and stopped as often as required.
After starting a schedule, new campaigns are automatically created and launched when the date and time defined in the schedule arrive. To see the results of any campaign, either scheduled or manually launched, open the campaign's editor.
For more information about accessing and understanding campaign results, refer toUnderstanding campaign results.
Deleted schedules cannot be recovered.
The campaigns that were created by a parent schedule are not deleted.
To delete a schedule, either right-click on it in the Schedules search view and select Delete, or select it and click the Delete icon in the toolbar. Click OK to confirm or click Cancel to keep the schedule.