Scheduling
Action Scheduling controls how replication jobs generated by Activate 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 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.
Parameter | Argument | Description |
---|---|---|
CaptureStartTimes | times | Defines that the capture jobs should be triggered at the given times, rather than cycling continuously. 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 below. |
CaptureOnceOnStart | 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 | Defines that the integrate job should run after a capture job routes new data. | |
IntegrateStartTimes | times | 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 below. |
IntegrateOnceOnStart | 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 | threshold | Threshold (in seconds) for the latency.
When this parameter is defined:
|
TimeContext | times | Defines that the parameter LatencySLA is active/valid at the given times. For the format of times see section Start Times below. |
Defining Multiple Latency SLA
You can use the parameter LatencySLA together with TimeContext for defining multiple latency SLA that are active/valid at different time period. For example, you can define one LatencySLA for the weekdays and another for the weekend:
Action | Parameter | Annotation |
---|---|---|
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 |
Start Times
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.