Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • H hello_world
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • support
  • hello_world
  • Issues
  • #5
Closed
Open
Created Sep 18, 2019 by jourdain@jourdainOwner

Job dependency

Hey by reading OTRS tickets I had an idea but I don't know if it's a good idea to put this on this repo or not :

I was thinking of adding a folder/script to give a bash template in order to use job dependecy.

For exemple here : hello_world/test_scripts/ and named it "job_dependency" with the following script inside :

#!/bin/bash

JOB1=` sbatch --job-name=job1 test.sh | awk '{print $4}'`
cp input_files.in input_files_for_next_job.in 
JOB2=`sbatch --dependency=afterok:$JOB1 test.sh | awk '{print $4}'`
JOB3=`sbatch --dependency=after:$JOB2 test.sh | awk '{print $4}'`
JOB4=`sbatch --dependency=afterany:$JOB1:$JOB2 :$JOB3 test.sh | awk '{print $4}'`
JOB5=`sbatch --job-name=job1 --dependency=singleton test.sh | awk '{print $4}'`

What do you think?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking