Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(job_defintion): add cron #2464

Merged
merged 2 commits into from
Mar 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 10 additions & 1 deletion docs/resources/job_definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
```

Expand All @@ -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.

Expand All @@ -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

Expand Down