Hello, It’s certainly possible to check whether the job is interactive or not, e.g.
if job_desc.script == nil or job_desc.script == '' then slurm.log_info("slurm_job_submit: jobscript is missing, assuming interactive job") else slurm.log_info("slurm_job_submit: jobscript is present, assuming non-interactive job") if is_defined(job_desc.partition) and job_desc.partition == "interactive“ then slurm.log_info("slurm_job_submit: interactive partition for non-interactive job, abort“) slurm.log_user("submit_job: ERROR: batch jobs are not allowed in the interactive partition. Use salloc followed by srun instead.“) return -1 end end Kind regards, Lech > Am 07.12.2020 um 15:31 schrieb Loris Bennett <loris.benn...@fu-berlin.de>: > > Hi, > > I would like to restrict interactive usage by, say, having a lower > maximum run-time for interactive jobs. > > Is there checking the value of job_desc.script the best way of > determining whether a job has been submitted via sbatch or not? > > Cheers, > > Loris > > -- > Dr. Loris Bennett (Hr./Mr.) > ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de >
smime.p7s
Description: S/MIME cryptographic signature