#!/bin/bash

if [[ -z ${1} ]]; then
    echo "Missing jobname argument"
    exit 1
fi
JOBID=$(squeue -o %i -h --name ${1})
scancel ${JOBID} || true