Skip to content
Snippets Groups Projects
Commit 049cbec3 authored by Danny Auble's avatar Danny Auble
Browse files

fix for if update job begin time is in the past we modify it to be now instead.

parent 7fb28bc8
No related branches found
No related tags found
No related merge requests found
......@@ -527,6 +527,8 @@ scontrol_update_job (int argc, char *argv[])
else if (!strncasecmp(tag, "EligibleTime", MAX(taglen, 2)) ||
!strncasecmp(tag, "StartTime", MAX(taglen, 2))) {
job_msg.begin_time = parse_time(val, 0);
if(job_msg->begin_time < time(NULL))
job_msg->begin_time = time(NULL);
update_cnt++;
}
else if (!strncasecmp(tag, "EndTime", MAX(taglen, 2))) {
......
......@@ -861,6 +861,8 @@ static const char *_set_job_msg(job_desc_msg_t *job_msg, const char *new_text,
case SORTID_TIME_ELIGIBLE:
case SORTID_TIME_START:
job_msg->begin_time = parse_time((char *)new_text, 0);
if(job_msg->begin_time < time(NULL))
job_msg->begin_time = time(NULL);
type = "start time";
break;
default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment