From 595eb717e7a86cf721e86710ba337fc51760033c Mon Sep 17 00:00:00 2001 From: Jules Casteran Date: Mon, 18 Mar 2024 09:51:49 +0100 Subject: [PATCH 1/2] docs(job_defintion): add cron --- docs/resources/job_definition.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/resources/job_definition.md b/docs/resources/job_definition.md index d63608c8f..b94924379 100644 --- a/docs/resources/job_definition.md +++ b/docs/resources/job_definition.md @@ -23,6 +23,11 @@ resource scaleway_job_definition main { env = { foo: "bar" } + + cron { + schedule = "5 4 1 * *" # cron at 04:05 on day-of-month 1 + timezone = "Europe/Paris" + } } ``` @@ -38,6 +43,9 @@ The following arguments are supported: - `command` - (Optional) The command that will be run in the container if specified. - `timeout` - (Optional) The job run timeout, in Go Time format (ex: `2h30m25s`) - `env` - (Optional) The environment variables of the container. +- `cron` - (Optional) The cron configuration + - `schedule` - Cron format string. + - `timezone` - The timezone, must be a canonical TZ identifier as found in this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#regions) of the Job. - `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the Job is associated with. @@ -46,7 +54,8 @@ The following arguments are supported: In addition to all arguments above, the following attributes are exported: - `id` - The ID of the Job Definition. -~> **Important:** Serverless Jobs Definition's IDs are [regional](../guides/regions_and_zones.md#resource-ids), which means they are of the form `{region}/{id}`, e.g. `fr-par/11111111-1111-1111-1111-111111111111 + +~> **Important:** Serverless Jobs Definition's IDs are [regional](../guides/regions_and_zones.md#resource-ids), which means they are of the form `{region}/{id}`, e.g. `fr-par/11111111-1111-1111-1111-111111111111` ## Import From dfc971c3ea209952495bb0014c679fcb5844c38d Mon Sep 17 00:00:00 2001 From: Jules Casteran Date: Mon, 18 Mar 2024 09:54:06 +0100 Subject: [PATCH 2/2] fix indent --- docs/resources/job_definition.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/resources/job_definition.md b/docs/resources/job_definition.md index b94924379..40a8319b0 100644 --- a/docs/resources/job_definition.md +++ b/docs/resources/job_definition.md @@ -44,8 +44,8 @@ The following arguments are supported: - `timeout` - (Optional) The job run timeout, in Go Time format (ex: `2h30m25s`) - `env` - (Optional) The environment variables of the container. - `cron` - (Optional) The cron configuration - - `schedule` - Cron format string. - - `timezone` - The timezone, must be a canonical TZ identifier as found in this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + - `schedule` - Cron format string. + - `timezone` - The timezone, must be a canonical TZ identifier as found in this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#regions) of the Job. - `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the Job is associated with.