Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tencentcloud/resource_tc_pts_cron_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ resource "tencentcloud_pts_cron_job" "cron_job" {
project_id = "project-7qkzxhea"
scenario_id = "scenario-c22lqb1w"
scenario_name = "pts-js(2022-11-10 21:53:53)"
frequency_type = 1
cron_expression = "4 22 10 11 ? 2022"
frequency_type = 2
cron_expression = "* 1 * * *"
job_owner = "userName"
# end_time = ""
notice_id = "notice-vp6i38jt"
Expand Down Expand Up @@ -82,7 +82,7 @@ func resourceTencentCloudPtsCronJob() *schema.Resource {
"cron_expression": {
Type: schema.TypeString,
Required: true,
Description: "Cron expression.",
Description: "Cron expression, When setting cron_expression at that time, frequency_type must be greater than 1.",
},

"job_owner": {
Expand Down
8 changes: 4 additions & 4 deletions tencentcloud/resource_tc_pts_cron_job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ func TestAccTencentCloudPtsCronJobResource_basic(t *testing.T) {
resource.TestCheckResourceAttr("tencentcloud_pts_cron_job.cron_job", "project_id", defaultPtsProjectId),
resource.TestCheckResourceAttr("tencentcloud_pts_cron_job.cron_job", "scenario_id", defaultScenarioId),
resource.TestCheckResourceAttr("tencentcloud_pts_cron_job.cron_job", "scenario_name", "keep-pts-js"),
resource.TestCheckResourceAttr("tencentcloud_pts_cron_job.cron_job", "frequency_type", "1"),
resource.TestCheckResourceAttr("tencentcloud_pts_cron_job.cron_job", "cron_expression", "4 22 10 11 ? 2022"),
resource.TestCheckResourceAttr("tencentcloud_pts_cron_job.cron_job", "frequency_type", "2"),
resource.TestCheckResourceAttr("tencentcloud_pts_cron_job.cron_job", "cron_expression", "* 1 * * *"),
resource.TestCheckResourceAttr("tencentcloud_pts_cron_job.cron_job", "job_owner", "userName"),
resource.TestCheckResourceAttr("tencentcloud_pts_cron_job.cron_job", "notice_id", defaultPtsNoticeId),
resource.TestCheckResourceAttr("tencentcloud_pts_cron_job.cron_job", "note", "desc"),
Expand Down Expand Up @@ -120,8 +120,8 @@ resource "tencentcloud_pts_cron_job" "cron_job" {
project_id = var.project_id
scenario_id = var.scenario_id
scenario_name = "keep-pts-js"
frequency_type = 1
cron_expression = "4 22 10 11 ? 2022"
frequency_type = 2
cron_expression = "* 1 * * *"
job_owner = "userName"
# end_time = ""
notice_id = var.notice_id
Expand Down
6 changes: 3 additions & 3 deletions website/docs/r/pts_cron_job.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ resource "tencentcloud_pts_cron_job" "cron_job" {
project_id = "project-7qkzxhea"
scenario_id = "scenario-c22lqb1w"
scenario_name = "pts-js(2022-11-10 21:53:53)"
frequency_type = 1
cron_expression = "4 22 10 11 ? 2022"
frequency_type = 2
cron_expression = "* 1 * * *"
job_owner = "userName"
# end_time = ""
notice_id = "notice-vp6i38jt"
Expand All @@ -32,7 +32,7 @@ resource "tencentcloud_pts_cron_job" "cron_job" {

The following arguments are supported:

* `cron_expression` - (Required, String) Cron expression.
* `cron_expression` - (Required, String) Cron expression, When setting cron_expression at that time, frequency_type must be greater than 1.
* `frequency_type` - (Required, Int) Execution frequency type, `1`: execute only once; `2`: daily granularity; `3`: weekly granularity; `4`: advanced.
* `job_owner` - (Required, String) Job Owner.
* `name` - (Required, String) Cron Job Name.
Expand Down