Skip to content
Snippets Groups Projects
Commit 73d2e4ed authored by Anne Tipka's avatar Anne Tipka :headphones:
Browse files

added a function to submit a batch job

parent 1e6cc1f5
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,7 @@
# July 2022 - Anne Tipka (formerly Philipp)
# - modified function put_file_to_ecserver to put the file automatically
# to $HOME directory, to avoid static path creation
# - added function to submit a batch job
#
# @License:
# (C) Copyright 2014-2020.
......@@ -695,6 +696,14 @@ def put_file_to_ecserver(ecd, filename):
return
def submit_sbatch_job(jobname):
'''
'''
job_id = subprocess.check_output(['sbatch', jobname])
print('SUBMITTED SBATCH JOB ',jobname)
return job_id.decode()
def submit_job_to_ecserver(target, jobname):
'''Uses ecaccess-job-submit command to submit a job to the ECMWF server.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment