as mentioned above, it is possible to cover up the table you are interested in triggers, to collect with their help needed to script data and populate a separate table, a kind of "scheduler" for the external script that the cron will pick up the job and generate the required reports. if the solution with the "scheduler" and Kron is not suitable and you want to "rialtaym," dig in the direction of the "external stored procedure" on signatures they are written starting with the 3rd, afaik, the version, and for a fresher can try any plugin from here
External Language Stored Procedures, you can use them to write in languages other than C (Java, Perl, and something else), though it works mysteriously, and if possible, it is best to write the old fashioned way on signatures without any additional plugins.