diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index ff072fe23..05c6e3c75 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,4 +1,5 @@ 7.5.21 + - fixed: Scheduled workflows based on day of week run on wrong day - improved debug messages for sql queries - fixed: Custom library directories don't override WebGUI core modules - Changed update() so that it only updates fields passed in, and the defaults diff --git a/docs/gotcha.txt b/docs/gotcha.txt index 330fb0f7e..a9357cb01 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -7,6 +7,14 @@ upgrading from one version to the next, or even between multiple versions. Be sure to heed the warnings contained herein as they will save you many hours of grief. +7.5.21 +-------------------------------------------------------------------- + * Previous versions of WebGUI used the wrong day of the week for + scheduled workflows. This resulted in them being run a day later + than they should have. If you relied on the old behavior, you + will need to update your workflow schedules. + + 7.5.19 -------------------------------------------------------------------- * WebGUI now requires Text::CSV_XS version 0.52. If you have been diff --git a/lib/Spectre/Cron.pm b/lib/Spectre/Cron.pm index cb64cc56b..aaf43c0af 100644 --- a/lib/Spectre/Cron.pm +++ b/lib/Spectre/Cron.pm @@ -161,7 +161,7 @@ sub checkSchedule { && $self->checkSegment($now->hour, $job->{hourOfDay}, [0..23]) && $self->checkSegment($now->day, $job->{dayOfMonth}, [1..31]) && $self->checkSegment($now->month, $job->{monthOfYear}, [1..12]) - && $self->checkSegment($now->dow-1, $job->{dayOfWeek}, [0..6]) ) { + && $self->checkSegment($now->dow % 7, $job->{dayOfWeek}, [0..6]) ) { $self->debug("It's time to run ".$jobId.". Creating workflow instance."); $kernel->yield("runJob",$jobId); }