google-cloud-platform - 使用 App Engine Cron 服务的 Cron 作业:每天在给定时间
问题描述
我正在尝试使用 Terraform 部署调度查询 (BigQuery)。我想让我的调度查询每天凌晨 3 点运行。调度查询正在使用 App Engine Cron 服务。
Terraform 提供的示例中包含一个计划作业。这对我有用。
schedule = "first sunday of quarter 00:00"
但是,我试图在每天凌晨 3:00 运行我的调度查询。我尝试的是:“ every 24h at 03:00
”,然后是“ every 24h from 03:00
”,但这些都不起作用
基于此文档,Data transfer schedule...Examples of valid format: 1st,3rd monday of month 15:30, every wed,fri of jan,jun 13:15, and first sunday of quarter 00:00. See more explanation about the format here: https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format NOTE: the granularity should be at least 8 hours, or less frequent.
我的代码:main.tf
resource "google_bigquery_data_transfer_config" "query_config" {
for_each = local.jobs
display_name = each.value.display_name
data_source_id = each.value.data_source_id
schedule = "every 24h at 03:00"
destination_dataset_id = each.value.destination_dataset_id
params = {
destination_table_name_template = each.value.destination_table_name_template
write_disposition = each.value.write_disposition
query = file("scheduling_queries/sql_repo/${each.value.display_name}.sql")
}
}
解决方案
在几次失败后得到它:every day 03:15
推荐阅读
- json - 从 Go 中的 json 文件中读取多个 json 对象
- java - Swing 布局未正确显示
- drupal - gatsby-source-drupal 不显示 graphql 查询
- r - ggplot2 - 如何将标签添加到堆叠百分比条形图
- typescript - 过滤树结构直到总项目达到其限制
- java - 如何将 WAV 文件 y 附加到现有的 WAV 文件 x, st x += y 中?
- hashicorp-vault - Kubernetes 到 Vault 身份验证失败
- c++ - 具有深度睡眠模式的低功耗 ESP32 + LoRa (TTGO LoRa32 OLED Board V1.0)
- asp.net-mvc - 如何从 XSD 和 WSDL 文件创建 web 服务?
- javascript - 如何将 JSON 中的数据保存在 state 中以便以后生成视图