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:
|
||||
name: {{.project_name}}_job
|
||||
|
||||
schedule:
|
||||
# Run every day at 9:27 AM
|
||||
quartz_cron_expression: 21 27 9 * * ?
|
||||
timezone_id: UTC
|
||||
trigger:
|
||||
# Run this job every day, exactly one day from the last run; see https://docs.databricks.com/api/workspace/jobs/create#trigger
|
||||
periodic:
|
||||
interval: 1
|
||||
unit: DAYS
|
||||
|
||||
email_notifications:
|
||||
on_failure:
|
||||
|
|
|
@ -10,10 +10,11 @@ resources:
|
|||
{{.project_name}}_job:
|
||||
name: {{.project_name}}_job
|
||||
|
||||
schedule:
|
||||
# Run every day at 8:37 AM
|
||||
quartz_cron_expression: '44 37 8 * * ?'
|
||||
timezone_id: Europe/Amsterdam
|
||||
trigger:
|
||||
# Run this job every day, exactly one day from the last run; see https://docs.databricks.com/api/workspace/jobs/create#trigger
|
||||
periodic:
|
||||
interval: 1
|
||||
unit: DAYS
|
||||
|
||||
{{- if not is_service_principal}}
|
||||
|
||||
|
|
|
@ -4,10 +4,11 @@ resources:
|
|||
{{.project_name}}_sql_job:
|
||||
name: {{.project_name}}_sql_job
|
||||
|
||||
schedule:
|
||||
# Run every day at 7:17 AM
|
||||
quartz_cron_expression: '44 17 7 * * ?'
|
||||
timezone_id: Europe/Amsterdam
|
||||
trigger:
|
||||
# Run this job every day, exactly one day from the last run; see https://docs.databricks.com/api/workspace/jobs/create#trigger
|
||||
periodic:
|
||||
interval: 1
|
||||
unit: DAYS
|
||||
|
||||
{{- if not is_service_principal}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue