From fc05fbd1eaae6f8f4be826551fc7581e7bd40b14 Mon Sep 17 00:00:00 2001 From: Anne Philipp <anne.philipp@univie.ac.at> Date: Mon, 25 Feb 2019 22:21:50 +0100 Subject: [PATCH] BugFix for job_chunk param. start_date counts as one full day and therefore we have to subtract one day from the 'inbetween' end_date to have to correct number of days per job. --- source/python/submit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/python/submit.py b/source/python/submit.py index 544f8a9..bd9ab6f 100755 --- a/source/python/submit.py +++ b/source/python/submit.py @@ -161,15 +161,15 @@ def submit(jtemplate, c, queue): start = datetime.strptime(c.start_date, '%Y%m%d') end = datetime.strptime(c.end_date, '%Y%m%d') chunk = timedelta(days=c.job_chunk) + oneday = timedelta(days=1) while start <= end: if (start + chunk) <= end: - c.end_date = (start + chunk).strftime("%Y%m%d") + c.end_date = (start + chunk - oneday).strftime("%Y%m%d") else: c.end_date = end.strftime("%Y%m%d") clist = c.to_list() - mk_jobscript(jtemplate, job_file, clist) job_id = submit_job_to_ecserver(queue, job_file) -- GitLab