Skip to content
Draft
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
19 changes: 19 additions & 0 deletions pages/serverless-jobs/concepts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@ dates:
---
import ServerlessConcepts from '@macros/serverless/serverless-concepts.mdx'

## Commands and arguments

Serverless Jobs allows you to customize the `command` and `args` instructions of your container image directly from the [Scaleway console](https://console.scaleway.com) and from the [Scaleway API](https://www.scaleway.com/en/developers/api/serverless-jobs/).

- The `command` instruction defines the command, process, or script executed when your job starts.
- The `args` instruction defines the arguments passed to the `command` instruction. Arguments can be passed as environment variables, as shown in the example below.

**Example**

```yaml
env:
- name: MESSAGE
value: "hello world"
command: ["/bin/echo"]
args: ["$(MESSAGE)"]
```

Refer to the [official Kubernetes documentation](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/) for more information on commands and arguments behavior.

## Container Registry

Container Registry is the place where your images are stored before being deployed. We recommend using Scaleway Container Registry for optimal integration. See the [migration guide](/serverless-jobs/api-cli/migrate-external-image-to-scaleway-registry/) for full details.
Expand Down
2 changes: 1 addition & 1 deletion pages/serverless-jobs/how-to/create-job.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Scaleway's Serverless Jobs allows you to create jobs from several container [reg
- Customize the ephemeral storage for your job according to your requirements. The data stored in your job is not retained once it is finished.
</TabsTab>
<TabsTab label="Execution">
1. Add a **startup command** to your job. It will be executed every time your job is run.
1. Add [commands and arguments](/serverless-jobs/concepts/#commands-and-arguments) to your job. they will be executed every time your job is run.
2. Set a **maximum duration** to your job to stop it automatically if it does not complete within this limit.
</TabsTab>
</Tabs>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: How to migrate from startup command to command and arguments
description: How to migrate from the legacy startup command system to the modern commands and arguments for Scaleway Serverless Jobs.
tags: containers
dates:
validation: 2025-12-23
posted: 2025-12-23
---

import Requirements from '@macros/iam/requirements.mdx'

The Serverless Jobs `v1alpha2` API introduces a new startup execution mechanism based on [commands and arguments](/serverless-containers/concepts/#commands-and-arguments), replacing the legacy startup command.

The Scaleway console allows you to quickly and easily migrate your existing jobs to the new system.

<Requirements />

- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
- An existing job that uses a startup command

## How to migrate from startup command to commands and arguments

1. Click **Jobs** in the **Serverless** section of the side menu. The jobs page displays.

2. Click the name of the job you want to manage, then click the **Settings** tab.

3. Scroll down to the **Configure advanced options**, then click the **Execution** tab.

4. Click the **Upgrade** button. A pop-up displays.

5. Split your existing startup command into a command (which corresponds to the `ENTRYPOINT` Docker instruction), and arguments (which correspond to the `CMD` Docker instruction).

6. Click **Upgrade to the new format** to finish.

Your Serverless Job now uses the command and arguments mechanism.

## Migration examples

### Simple command

**Legacy startup command**

```bash
sleep 60s
```

**Corresponding command and arguments**

```yaml
command: [sleep]
args: [60s]
```

### Complex command

**Legacy startup command**

```bash
/app/migrate up --database "$DB_URL" --password "$DB_PASSWORD" --port 3002
```

**Corresponding command and arguments**

```yaml
command: [/app/migrate]
args: [up, --database, "$(DB_URL)", --password, "$(DB_PASSWORD)", --port, 3002]
```

Refer to the [official Kubernetes documentation](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/) for more information on command and arguments behavior and syntax.
4 changes: 4 additions & 0 deletions pages/serverless-jobs/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ export const serverlessJobsMenu = {
label: 'Configure alerts for a job',
slug: 'configure-alerts-jobs',
},
{
label: 'Migrate from startup command to command and arguments',
slug: 'migrate-startup-command-to-command-args',
},
{
label: 'Delete a job',
slug: 'delete-job',
Expand Down
Loading