There are a couple ways to do this with Octavia. You can set the schedule with cron where it will wait to run until the time you configured, or you can set it to Manual
where it will only run upon being manually triggered. These config options can be found in the connector’s generated configuration.yaml
before you run the final octavia apply
to add/update the connector in Airbyte.
For example, connectors/<connection_name>/configuration.yaml
includes something like the below. By default it will schedule the sync to run once every hour:
schedule_type: basic # OPTIONAL | string | Allowed values: basic, cron, manual
schedule_data: # OPTIONAL | object
basic_schedule:
time_unit: hours # REQUIRED | string | Allowed values: minutes, hours, days, weeks, months
units: 1 # REQUIRED | integer
# cron:
# cron_time_zone: "UTC" # REQUIRED | string
# cron_expression: "* */2 * * * ?" # REQUIRED | string
If you want manual syncs only, change schedule_type
to manual
and then remove or comment out the schedule_data
block:
schedule_type: manual # OPTIONAL | string | Allowed values: basic, cron, manual
#schedule_data: # OPTIONAL | object
# basic_schedule:
# time_unit: hours # REQUIRED | string | Allowed values: minutes, hours, days, weeks, months
# units: 1 # REQUIRED | integer
# cron:
# cron_time_zone: "UTC" # REQUIRED | string
# cron_expression: "* */2 * * * ?" # REQUIRED | string
If you want to schedule your syncs with cron, change schedule_type
to cron
and add your cron expression. It doesn’t matter if you leave basic_schedule
in the config since the schedule_type
will override it. The below expression runs the sync every Tuesday at 16:14 Eastern Time:
schedule_type: cron # OPTIONAL | string | Allowed values: basic, cron, manual
schedule_data: # OPTIONAL | object
basic_schedule:
time_unit: hours # REQUIRED | string | Allowed values: minutes, hours, days, weeks, months
units: 1 # REQUIRED | integer
cron:
cron_time_zone: "America/New_York" # REQUIRED | string
cron_expression: "0 14 16 ? * TUE *" # REQUIRED | string
Once this is configured, you can finally run octavia apply
to add or update the connector in Airbyte without it syncing immediately.
Although this isn’t documented in the readme, Octavia communicates with the Airbyte public API so you can find more info on the settings here: https://airbyte-public-api-docs.s3.us-east-2.amazonaws.com/rapidoc-api-docs.html#post-/v1/connections/update