diff --git a/include/pro_scheduler/pgproJob.h b/include/pro_scheduler/pgproJob.h index 8f56706..fddc763 100644 --- a/include/pro_scheduler/pgproJob.h +++ b/include/pro_scheduler/pgproJob.h @@ -144,10 +144,10 @@ public: bool novalid = false; int nextp = getnext(_mi, sizeof(_mi) / sizeof(_mi[0]),mi, dr); - if (nextp == -1) { + if (nextp == -1 || !_wd[wd]) { mi = getfirst(_mi, sizeof(_mi) / sizeof(_mi[0]), dr); nextp = getnext(_h, sizeof(_h) / sizeof(_h[0]), h, dr); - if (nextp == -1) { + if (nextp == -1 || !_wd[wd]) { // hours h = getfirst(_h, sizeof(_h) / sizeof(_h[0]), dr); do { diff --git a/pro_scheduler/pgproJob.cpp b/pro_scheduler/pgproJob.cpp index 006ad0f..0f54c0d 100644 --- a/pro_scheduler/pgproJob.cpp +++ b/pro_scheduler/pgproJob.cpp @@ -148,6 +148,9 @@ void pgproJob::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *prop properties->AppendItem(_("Comment"), firstLineOnly(GetComment())); //wxDateTime dt= GetNextSchedule_At(GetStarted(),-1); wxDateTime t = wxDateTime::Now(); + wxDateTime nextdt = GetNextSchedule_At(t, 1); + properties->AppendItem(_("Next start job"), nextdt); + wxDateTime dt = GetStarted(); if (!dt.IsValid()) dt = t; wxDateTime prev;