Skip to content

Commit ca1835c

Browse files
authored
docs(serverless_jobs): add documentation for command, timezone and schedule fields (#483)
1 parent f8a3a6e commit ca1835c

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

scaleway-async/scaleway_async/jobs/v1alpha1/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ async def create_job_definition(
6464
:param cpu_limit: CPU limit of the job.
6565
:param memory_limit: Memory limit of the job (in MiB).
6666
:param image_uri: Image to use for the job.
67-
:param command: Startup command.
67+
:param command: Startup command. If empty or not defined, the image's default command is used.
6868
:param description: Description of the job.
6969
:param region: Region to target. If none is passed will use default region from the config.
7070
:param name: Name of the job definition.

scaleway-async/scaleway_async/jobs/v1alpha1/types.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,14 @@ def __str__(self) -> str:
4848
@dataclass
4949
class CronSchedule:
5050
schedule: str
51+
"""
52+
UNIX cron schedule to run job (e.g., '* * * * *').
53+
"""
5154

5255
timezone: str
56+
"""
57+
Timezone for the cron schedule, in tz database format (e.g., 'Europe/Paris').
58+
"""
5359

5460

5561
@dataclass
@@ -159,7 +165,7 @@ class CreateJobDefinitionRequest:
159165

160166
command: str
161167
"""
162-
Startup command.
168+
Startup command. If empty or not defined, the image's default command is used.
163169
"""
164170

165171
description: str

scaleway/scaleway/jobs/v1alpha1/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def create_job_definition(
6464
:param cpu_limit: CPU limit of the job.
6565
:param memory_limit: Memory limit of the job (in MiB).
6666
:param image_uri: Image to use for the job.
67-
:param command: Startup command.
67+
:param command: Startup command. If empty or not defined, the image's default command is used.
6868
:param description: Description of the job.
6969
:param region: Region to target. If none is passed will use default region from the config.
7070
:param name: Name of the job definition.

scaleway/scaleway/jobs/v1alpha1/types.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,14 @@ def __str__(self) -> str:
4848
@dataclass
4949
class CronSchedule:
5050
schedule: str
51+
"""
52+
UNIX cron schedule to run job (e.g., '* * * * *').
53+
"""
5154

5255
timezone: str
56+
"""
57+
Timezone for the cron schedule, in tz database format (e.g., 'Europe/Paris').
58+
"""
5359

5460

5561
@dataclass
@@ -159,7 +165,7 @@ class CreateJobDefinitionRequest:
159165

160166
command: str
161167
"""
162-
Startup command.
168+
Startup command. If empty or not defined, the image's default command is used.
163169
"""
164170

165171
description: str

0 commit comments

Comments
 (0)