mirror of https://github.com/databricks/cli.git
Use periodic triggers in all templates (#1739)
## Summary Simplifies template by using the periodic trigger syntax instead of the cron schedule syntax. Periodic triggers are simpler to configure, simpler to read, and make sure that workloads are spread out through the day. We only recommend cron syntax for advanced cases or when more control is needed. ## Testing * Templates validation via unit tests * Manual validation that the new triggers work as expected in dev/prod
This commit is contained in:
parent
fb077a85d2
commit
f2dee890b8
|
@ -3,10 +3,11 @@ resources:
|
||||||
{{.project_name}}_job:
|
{{.project_name}}_job:
|
||||||
name: {{.project_name}}_job
|
name: {{.project_name}}_job
|
||||||
|
|
||||||
schedule:
|
trigger:
|
||||||
# Run every day at 9:27 AM
|
# Run this job every day, exactly one day from the last run; see https://docs.databricks.com/api/workspace/jobs/create#trigger
|
||||||
quartz_cron_expression: 21 27 9 * * ?
|
periodic:
|
||||||
timezone_id: UTC
|
interval: 1
|
||||||
|
unit: DAYS
|
||||||
|
|
||||||
email_notifications:
|
email_notifications:
|
||||||
on_failure:
|
on_failure:
|
||||||
|
|
|
@ -10,10 +10,11 @@ resources:
|
||||||
{{.project_name}}_job:
|
{{.project_name}}_job:
|
||||||
name: {{.project_name}}_job
|
name: {{.project_name}}_job
|
||||||
|
|
||||||
schedule:
|
trigger:
|
||||||
# Run every day at 8:37 AM
|
# Run this job every day, exactly one day from the last run; see https://docs.databricks.com/api/workspace/jobs/create#trigger
|
||||||
quartz_cron_expression: '44 37 8 * * ?'
|
periodic:
|
||||||
timezone_id: Europe/Amsterdam
|
interval: 1
|
||||||
|
unit: DAYS
|
||||||
|
|
||||||
{{- if not is_service_principal}}
|
{{- if not is_service_principal}}
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,11 @@ resources:
|
||||||
{{.project_name}}_sql_job:
|
{{.project_name}}_sql_job:
|
||||||
name: {{.project_name}}_sql_job
|
name: {{.project_name}}_sql_job
|
||||||
|
|
||||||
schedule:
|
trigger:
|
||||||
# Run every day at 7:17 AM
|
# Run this job every day, exactly one day from the last run; see https://docs.databricks.com/api/workspace/jobs/create#trigger
|
||||||
quartz_cron_expression: '44 17 7 * * ?'
|
periodic:
|
||||||
timezone_id: Europe/Amsterdam
|
interval: 1
|
||||||
|
unit: DAYS
|
||||||
|
|
||||||
{{- if not is_service_principal}}
|
{{- if not is_service_principal}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue