PrimeHub
  • Introduction
  • Installation
  • Tiers and Licenses
  • End-to-End Tutorial
    • 1 - MLOps Introduction and Scoping the Project
    • 2 - Train and Manage the Model
    • 3 - Compare, Register and Deploy the Model
    • 4 - Build the Web Application
    • 5 - Summary
  • User Guide
    • User Portal
    • Notebook
      • Notebook Tips
      • Advanced Settings
      • PrimeHub Notebook Extension
      • Submit Notebook as Job
    • Jobs
      • Job Artifacts
      • Tutorial
        • (Part1) MNIST classifier training
        • (Part2) MNIST classifier training
        • (Advanced) Use Job Submission to Tune Hyperparameters
        • (Advanced) Model Serving by Seldon
        • Job Artifacts Simple Usecase
    • Models
      • Manage and Deploy Model
      • Model Management Configuration
    • Deployments
      • Pre-packaged servers
        • TensorFlow server
        • PyTorch server
        • SKLearn server
        • Customize Pre-packaged Server
        • Run Pre-packaged Server Locally
      • Package from Language Wrapper
        • Model Image for Python
        • Model Image for R
        • Reusable Base Image
      • Prediction APIs
      • Model URI
      • Tutorial
        • Model by Pre-packaged Server
        • Model by Pre-packaged Server (PHFS)
        • Model by Image built from Language Wrapper
    • Shared Files
    • Datasets
    • Apps
      • Label Studio
      • MATLAB
      • MLflow
      • Streamlit
      • Tutorial
        • Create Your Own App
        • Create an MLflow server
        • Label Dataset by Label Studio
        • Code Server
    • Group Admin
      • Images
      • Settings
    • Generate an PrimeHub API Token
    • Python SDK
    • SSH Server Feature
      • VSCode SSH Notebook Remotely
      • Generate SSH Key Pair
      • Permission Denied
      • Connection Refused
    • Advanced Tutorial
      • Labeling the data
      • Notebook as a Job
      • Custom build the Seldon server
      • PrimeHub SDK/CLI Tools
  • Administrator Guide
    • Admin Portal
      • Create User
      • Create Group
      • Assign Group Admin
      • Create/Plan Instance Type
      • Add InfuseAI Image
      • Add Image
      • Build Image
      • Gitsync Secret for GitHub
      • Pull Secret for GitLab
    • System Settings
    • User Management
    • Group Management
    • Instance Type Management
      • NodeSelector
      • Toleration
    • Image Management
      • Custom Image Guideline
    • Volume Management
      • Upload Server
    • Secret Management
    • App Settings
    • Notebooks Admin
    • Usage Reports
  • Reference
    • Jupyter Images
      • repo2docker image
      • RStudio image
    • InfuseAI Images List
    • Roadmap
  • Developer Guide
    • GitHub
    • Design
      • PrimeHub File System (PHFS)
      • PrimeHub Store
      • Log Persistence
      • PrimeHub Apps
      • Admission
      • Notebook with kernel process
      • JupyterHub
      • Image Builder
      • Volume Upload
      • Job Scheduler
      • Job Submission
      • Job Monitoring
      • Install Helper
      • User Portal
      • Meta Chart
      • PrimeHub Usage
      • Job Artifact
      • PrimeHub Apps
    • Concept
      • Architecture
      • Data Model
      • CRDs
      • GraphQL
      • Persistence Storages
      • Persistence
      • Resources Quota
      • Privilege
    • Configuration
      • How to configure PrimeHub
      • Multiple Jupyter Notebook Kernels
      • Configure SSH Server
      • Configure Job Submission
      • Configure Custom Image Build
      • Configure Model Deployment
      • Setup Self-Signed Certificate for PrimeHub
      • Chart Configuration
      • Configure PrimeHub Store
    • Environment Variables
Powered by GitBook
On this page
  • Features
  • Configuration
  • Design
  • Custom Resource
  • Timezone
  • Job Concurrency
  • Job Label
  1. Developer Guide
  2. Design

Job Scheduler

PreviousVolume UploadNextJob Submission

Last updated 2 years ago

Allow users to schedule regular and repetitive jobs.

Features

  1. Job: It has all the features that Job Submission has.

  2. Recurrence: Allow to set Inactive, Daily, Weekly, Monthly, Custom Cron Format.

  3. Run Manually: Allow to run scheduled jobs manually.

Configuration

Please add this variable to the .env file.

Name
Value

PRIMEHUB_FEATURE_JOB_SUBMISSION

true

Design

Custom Resource

A PhSchedule is defined for PrimeHub-defined scheduled job. It utilizes the PrimeHub-defined job. It will submit a job regularly based on recurrence settings and job settings.

Here is an example of PhSchedule.

apiVersion: primehub.io/v1alpha1
kind: PhSchedule
metadata:
  name: schedule-qm42d
  namespace: hub
spec:
  recurrence:
    type: "custom"
    cron: "*/1 * * * *"
  jobTemplate:
    metadata:
      annotations: {}
      labels: {}
    spec:
      command: |-
        echo "start"
      displayName: Test Job
      userId: 619156fe-43c6-44f3-b20e-2d5f96e4df96
      userName: user  
      groupId: d8257cb0-3c89-4243-98c2-cdc737ec61d3
      groupName: test-job-submission
      image: base-notebook
      instanceType: cpu-tiny
status:
  invalid: false
  nextRunTime: "2020-03-01T00:00:00Z"
  message: ""
  

Recurrence

  • Inactive

  • Every Day (at 4:00am)

  • Every Week (Sundays at 4:00am)

  • Every Month (on the 1st at 4:00am)

Invalid State

When a schedule contains a non-existing user/group/instancetype/image or the custom cron format is wrong, it would be marked as an invalid schedule.

Timezone

The timezone depends on the system timezone setting. If the system timezone changes, the schedule's cron setting would not change. However, the next run time would change because of timezone change.

The controller reconciles every 10mins so that the timezone setting would reflect in 10 mins.

Job Concurrency

When a schedule is triggered, it will not spawn a new job if the previous job is still running.

If a job is manually run against the schedule, it can run multiple jobs. And the scheduled job will also run no matter the manually ran job is completed or not. Because the manually spawned job is not associated with the schedule.

Job Label

If a job is spawned by the job scheduler, it will have a label:

phjob.primehub.io/scheduledBy: schedule-qm42d

Custom: needs an additional field.

custom resource
cron