Managing Your Jobs

Use these tutorials to create, modify, and run your jobs.

Creating Jobs

Before you begin:

Before creating the job, you must create your code file with the actions you want your job to perform. In this tutorial, we will use Python technology.

  1. Create a Python file called hello-scranton.py.

  2. Open a new file in your preferred text editor.

  3. Copy and paste the following code into your file:

    print("Hello, Scranton Branch!")
  4. Save the file as hello-scranton.py.

  1. Click the The "Projects" module icon is a folder. Projects module from the primary navigation menu.
    Your project library opens and lists the projects you’ve created.

  2. Click a project.
    The project opens on its job library.

    Navigate to your project

  3. Click New job to create a new job.
    The New job page opens.

  4. Enter the required information.

    1. Enter a name and add a description.

    2. Click Continue.

    3. Select your job type and technology.

    4. Click Continue.

    5. Configure the technology version, upload your code file, and enter your shell command.

    6. Click Continue.

    7. Configure your job settings. For more information, see Job Settings.

  5. Click Create job to confirm the creation.
    The The "Overview" page icon is a square divided into several other squares. Overview page of your job opens and a message appears saying that your Job <Name_of_your_Job> has been created.

Running and Stopping Jobs

You can run or stop your jobs manually, even when the jobs are scheduled to run.

  1. Click the The "Projects" module icon is a folder. Projects module from the primary navigation menu.
    Your project library opens and lists the projects you’ve created.

  2. Click a project.
    The project opens on its job library.

    Navigate to your project

  3. From the list, click a job to access its details.
    The job The "Overview" page icon is a square divided into several other squares. Overview page opens.

  4. Click either Run or Stop depending of the current status of your job.

    You can also access this command at the bottom of the secondary navigation menu from the The "Instances" page icon is three overlapping squares. Instances and The "Versions" page icon is a folder with an arrow pointing up. Versions page.

    The job status changes depending on the outcome.

Modifying Job Settings

After its creation, you can always modify your job settings. You can access the settings from the The "Overview" page icon is a square divided into several other squares. Overview page of the job.

  1. Click the The "Projects" module icon is a folder. Projects module from the primary navigation menu.
    Your project library opens and lists the projects you’ve created.

  2. Click a project.
    The project opens on its job library.

    Navigate to your project

  3. From the list, click a job to access its details.
    The job The "Overview" page icon is a square divided into several other squares. Overview page opens.

  4. Job settings are accessible from the The "Overview" page icon is a square divided into several other squares. Overview page. Click the desired element to edit it:

    Job settings from the "Overview" page.
    • 1 - Name

    • 2 - Description

    • 3 - Scheduled Run

    • 4 - Email Alerts

    • 5 - Resources

    Names are mandatory, with a maximum of 255 characters, and unique within a project.

    Descriptions are optional and have no restrictions, but it’s a good practice to keep them short and informative.

    There are two runtime types:

    • The manual run, which requires you to click Run to start the job.

    • The scheduled run, which launches the job according to the schedule you choose.

      Scheduled jobs can also be started manually.

      The Scheduled run type has three schedule modes: Simple, Shortcut, and Expert.

      • In Simple mode, you can easily specify variables through the user interface. There are many possibilities.

        Screenshot of the settings for the scheduled run type in simple mode

      • In Shortcut mode, you can choose the recurrence of your run on an hourly, daily, weekly, monthly, or annual basis. All other settings are automatic.

        Screenshot of the settings for the scheduled run type in shortcut mode

      • In Expert mode, you can specify variables using the Cron format. The Cron time string consists of five values separated by spaces: [minute] [hour] [day of the month] [month] [day of the week]. They are based on the following information:

        Table 1. Cron format
        Descriptor Acceptable values

        Minute

        0 to 59, or *

        Hour

        0 to 23, or *

        Day of the month

        1 to 31, or *

        Month

        1 to 12, or *

        Day of the week

        0 to 7 (0 and 7 both represent Sunday), or *

        The Cron time string must contain entries for each character attribute. If you want to set a value using only minutes, you must have asterisk characters for the other four attributes that you’re not configuring.

        Screenshot of the settings for the scheduled run type in expert mode

        Once you have finished scheduling your run, you will see the summary of your choice written below and the time of the next run.

    Alerts are optional and can be set to receive an email when the status of your job changes. They can be sent to multiple email addresses to notify you of the following status changes:

    • queued requested Requested: the job’s run has been requested and is being executed.

    • queued requested Queued: the job is waiting for the necessary resources to be executed.

    • spinner Running: the job is up and running.

    • success Succeeded: the job has been successfully executed.

    • stop Stopping: the job is stopping.

    • stop Stopped: the job has stopped running.

    • failed Failed: the job has crashed.

    • unknown Unknown: the job no longer runs because an error has occurred.

    For embedded jobs only.

    CPU/GPU and RAM resources are optional and can be specified for optimal execution.

    The consumption of your job can be managed on the basis of guaranteed resources, that is, the minimum amount of resource requested, and limited resources, that is, the maximum amount of resource that can be consumed.

    This works the same way for CPU/GPU and RAM resources, except that for RAM you can choose between GB and MB units of measure.

    By default, job resource management is disabled because decisions about resource requests and limits are difficult to make without historical data about resource usage patterns of jobs.

    Except for specific requirements, you may not enable this feature and let Saagie automatically assign the appropriate resource requests and limits for your job.

    Automatic adjustments can be made to avoid inconsistent configurations. If you try to set a guaranteed value greater than the limit value or, similarly, if you try to set a limit value smaller than the guaranteed value, a note appears to inform you that, depending on the situation, the guaranteed value or the limit value has been adjusted (a).

    For GPU resources, the guaranteed and limit values must be equal.

    RAM limit adjustment message.

    In addition, when the guaranteed value and the limit value are not optimal, a recommendation notification appears with the appropriate values for an optimal configuration (b).

    CPU recommendation message.

    Switching from CPU to GPU resources results in the loss of the current configuration.
    Modifying CPU/GPU and RAM resources automatically restarts your job.
  5. Saving is automatic. You can just press Enter to validate the job name change, click anywhere nearby to confirm the description change, and close de side panel to validate the scheduled run, email alert and resource changes.

Upgrading Jobs

You can upgrade your jobs to always get the most out of them. By upgrading your job, you create a new version of it.

Before you begin:

You must update your code file or create a new one.

  1. Open your file in your preferred text editor.

  2. Copy and paste the following code into your file:

    print("Hi there, Scranton Branch!")
  3. Save the file as hi-scranton.py.

  1. Click the The "Projects" module icon is a folder. Projects module from the primary navigation menu.
    Your project library opens and lists the projects you’ve created.

  2. Click a project.
    The project opens on its job library.

    Navigate to your project

  3. From the list, click a job to access its details.
    The job The "Overview" page icon is a square divided into several other squares. Overview page opens.

    On this page you can see information about the last update, such as when it took place, by whom, the technology and runtime context used, the package and log of the job.
  4. From the The "Instances" page icon is three overlapping squares. Instances or The "Versions" page icon is a folder with an arrow pointing up. Versions page, click Upgrade job button.
    The Upgrade job page opens.

  5. Enter the information you want to change. You can:

    1. Change the runtime context, upload the new or updated code file, and change the shell command.

    2. Click Continue.

    3. Add a release note to briefly explain your changes.

    4. Click Save job to save your changes and exit the job upgrade settings.

    Your job has been upgraded and you should see that a new version of it has been created, along with a new instance.

Moving Jobs

You can move or migrate jobs from their current project to another project on the same platform.

If the job was part of a pipeline at some point, the job can only be moved if that pipeline has been deleted.
  1. Click the The "Projects" module icon is a folder. Projects module from the primary navigation menu.
    Your project library opens and lists the projects you’ve created.

  2. Click a project.
    The project opens on its job library.

    Navigate to your project

  3. From the list, select a job by checking the box next to the job.

    • You can move one or more jobs at the same time, provided that it is jobs from the same category and technology, and are moved to the same project.

    • You cannot select a job if it is already part of a pipeline.

    A pop-in window appears with the number of selected jobs and options for moving them.

    Pop-in window with the number of selected jobs and option for moving them.
  4. From the pop-in, select the new project and category for the selected job(s).

    You can move your job(s) to any project you have access to and whose job technology is selected in its settings.
  5. Click Move.
    A warning message appears indicating that moving job(s) may impact its functionality.

  6. Select Start Migration to confirm the move or Cancel to cancel it.
    Depending on the complexity of the job, this may take a few minutes to complete.