Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The newly added daily mail report cannot be sent on the same day! #18378

Open
keller31 opened this issue Nov 25, 2021 · 2 comments
Open

The newly added daily mail report cannot be sent on the same day! #18378

keller31 opened this issue Nov 25, 2021 · 2 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.

Comments

@keller31
Copy link

keller31 commented Nov 25, 2021

The newly added daily mail report cannot be sent on the same day!

Steps to Reproduce

  1. Add a new daily email report, such as 4:00 pm (current 2:00 pm)
  2. No email report will be sent at 4:00 pm on the same day
  3. Check TasksTimetable to find the task at 4:00 pm the next day

Environment

  • Matomo Version: 4.5.0
  • PHP Version: 7.4

image

@keller31 keller31 added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Nov 25, 2021
@sgiehl
Copy link
Member

sgiehl commented Nov 25, 2021

Had a look at the code and currently new tasks will always be scheduled for the next day. Guess we would need to apply some changes here to changes that behavior:

public function getRescheduledTime()
{
$currentTime = $this->getTime();
// Add one day
$rescheduledTime = mktime(date('H', $currentTime),
date('i', $currentTime),
date('s', $currentTime),
date('n', $currentTime),
date('j', $currentTime) + 1,
date('Y', $currentTime)
);
// Adjusts the scheduled hour
$rescheduledTime = $this->adjustHour($rescheduledTime);
$rescheduledTime = $this->adjustTimezone($rescheduledTime);
return $rescheduledTime;
}

@sgiehl sgiehl added Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Nov 25, 2021
@Sofia-Morgado
Copy link

@keller31 Hello :) I’m participating on Hacktoberfest 2022, can I take this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Projects
None yet
Development

No branches or pull requests

4 participants