vt74 - Scheduled Report On Specific Date sends every hour
We have a report scheduled to send on a specific date and time. When the date and time is reached the report is sent, however the report is then resent every hour afterwards. The report should only be sent once.
The issue appears to be that the vtiger_schedulereports.next_trigger_time is updated each time, which appears to be because the column has as default of CURRENT_TIMESTAMP. When the code in /modules/Reports/Models/ScheduleReports.php tries to update the entry with a next_trigger_time of NULL (which is correct as there is no next trigger time) the value actually updates to the current timestamp + 1 hr (not sure if the +1hr is because of our timezone being BST?).
I fixed the issue by making the column nullable, and set the default to NULL instead.