Scheduling
Action Scheduling controls how replication jobs generated by Activate Replication and Refresh will be run by Scheduler. By default, (if this action is not defined) Fivetran HVR schedules capture and integrate jobs to run continuously. This means after each replication cycle they will keep running and wait for new data to arrive. Other parameters/properties also affect the scheduling of replication jobs, for example location property Trigger_Toggle_Frequency.
If this action is defined on a specific table, then it affects the entire job including data from other tables for that location.
A Scheduling action is only effective at the moment when a job is first created, i.e. when Activate Replication creates capture or integrate jobs or when Refresh creates a refresh job. After this moment, redefining this action has no effect.
Parameters
This section describes the parameters available for action Scheduling.
Following are the two tabs/ways, which you can use for defining action parameters in this dialog:
- Regular: Allows you to define the required parameters by using the UI elements like checkbox and text field.
- Text: Allows you to define the required parameters by specifying them in the text field. You can also copy-paste the action definitions from HVR documentation, emails, or demo notes.
CaptureStartTimes
Argument: times
Description: Defines that the capture jobs should be triggered at the given times, rather than cycling continuously.
For example, CaptureStartTimes=0 * * * 1–5 specifies that capture jobs should be triggered at the start of each hour from Monday to Friday.
For the format of times see section Start Times Format below.
CaptureOnceOnStart
Description: Capture job runs for one cycle after trigger.
This means that the job does not run continuously, but is also not triggered automatically at specified times (the behavior of CaptureStartTimes). Instead, the job stays PENDING until it is started manually with command hvrstart.
IntegrateStartAfterCapture
Description: Defines that the integrate job should run after a capture job routes new data.
IntegrateStartTimes
Argument: times
Description: Defines that the integrate jobs should be triggered at the given times, rather than cycling continuously.
For the format of times see section Start Times Format below.
IntegrateOnceOnStart
Description: Integrate job runs for one cycle after trigger. This means that the job does not run continuously, but is also not triggered automatically at specified times (the behavior of IntegrateAfterCapture or IntegrateStartTimes). Instead, the job stays PENDING until it is started manually with command hvrstart.
LatencySLA
Argument: threshold
Description: Threshold (in seconds) for the latency.
Latency is the time taken for a transaction committed on the source location to be replicated/committed on the target location.
When this parameter is defined:
Alerts can be triggered when latency exceeds the value defined in this field.
The color of the data flow lines in Topology is impacted.
The small latency graphs in HVR UI (e.g. Channel Details, Jobs) will display a red line to indicate the latency SLA defined in this field.
Defining Multiple Latency SLA
Use the parameter LatencySLA together with TimeContext to define multiple latency SLAs that are active/valid during different time periods. For example, you can define one latency SLA for weekdays and another for weekends:
Action | Parameter | Remarks |
---|---|---|
Scheduling | LatencySLA=10 TimeContext=* * * * 1-5 | Latency SLA is set to 10 seconds during weekdays |
Scheduling | LatencySLA=20 TimeContext=* * * * 0,6 | Latency SLA is set to 20 seconds during weekends |
TimeContext
Argument: times
Description: Defines that the parameter LatencySLA is active/valid at the given times.
For the format of times see section Start Times Format below.
Start Times Format
Argument times uses a format that closely resembles the format of Unix's crontab and is also used by scheduler attribute trig_crono. It is composed of five integer patterns separated by spaces. These integer patterns specify:
- minute (0–59)
- hour (0–23)
- day of the month (1–31)
- month of the year (1–12)
- day of the week (0–6 with 0=Sunday)
Each pattern can be either an asterisk (meaning all legal values) or a list of comma–separated elements. An element is either one number or two numbers separated by a hyphen (meaning an inclusive range). All dates and times are interpreted using the local–time. Note that the specification of days can be made by two fields (day of the month and day of the week): if both fields are restricted (i.e. are not *), the job will be started when either field matches the current time.
Multiple start times can be defined for the same job. For example, you can define multiple start times to trigger the job on every 15, 30, 45, and 0th minute within the same action using the CRON expression 15,30,45,0 * * * *. It is also possible to have multiple Scheduling actions defined with different times to trigger the job.