With Smart Report Maker (SRM), users can set up MySQL scheduled reports to be sent automatically via personalized emails, including both a link to the report and a PDF attachment. This feature is ideal for users who want specific reports delivered periodically to designated groups (e.g., monthly, weekly).
How Scheduled Reports Work
SRM leverages a cron job to manage the automation of scheduled report emails. This cron job, available only on Linux systems, runs every minute to check for scheduled tasks. It’s generally set up automatically during installation, but in cases where SRM is installed via Composer or cPanel (rather than Docker), it’s recommended to verify that the cron job was successfully created. You can find the cron job details under Settings > General > General Settings at Needed Cronjob.
In addition to the Cron job, an SMTP server must be configured for email functionality. This setup is found under Settings > General > SMTP Server and must be configured by an admin to enable email delivery. For help regarding SMTP configuration please click this link
Managing Scheduled Reports
Admins can access Scheduled Reports in the left side panel to manage existing scheduled tasks. Here are the options for each task:
- Edit or Delete: Modify or remove a scheduled task.
- Manually Send Now: Sends the report immediately, regardless of the scheduled time.
- Stop: Pauses the task so it will not send in the future, regardless of the end date.
- View Log: Opens the log for the task to view its history, status, and any errors that have occurred—this is particularly helpful for troubleshooting.
Adding or Editing a Scheduled Report Task
Adding or editing a scheduled report opens two forms: one for Scheduled Report Settings and another for Mail Settings.
1. Scheduled Report Settings
This form defines the key details for the report’s scheduling, including:
- Task Title: A reference name for the task.
- Scheduled Start and End Dates: Defines the duration for which the report will be sent. After the end date, the task will automatically stop.
- Sending Frequency: Choose from hourly, daily, weekly, or monthly options.
- Sending Time and Day: For daily, weekly, and monthly frequencies, specify the time and day for the report. For instance:
- Set the task to run on the first day of each month.
- Schedule it for every Monday at 9 AM.
- Use the Last Day of the Month option for reports intended to go out on the month’s final day.
- Report and Recipient Groups: Select the report and specify user groups to receive it; multiple groups can be added.
- Send to Admin: Enabling this option sends the report to all admins.
2. Mail Settings
This form configures the email content and personalization settings:
- Email Subject and Body: Customize the subject and body text, with options to personalize emails with recipients’ first names and an email signature.
- First Name Personalization: The recipient’s first name is automatically inserted.
- Email Signature: Inserts the predefined email signature from Settings > General > General Settings.
The email will include the report as both a link in the body and a PDF attachment, ensuring easy access and a ready-to-view format.
Key Benefits of MySQL Scheduled Reports in SRM
- Automated Delivery: Reports are sent on a recurring schedule, reducing the need for manual effort.
- Personalized Emails: Customizable email content allows for personal greetings and signatures, enhancing communication.
- PDF Attachments: Each scheduled email includes the report as a PDF attachment, making it convenient for recipients to view or save the report.
- Interactive Logs: Admins can track each scheduled report’s history and address any issues promptly through detailed logs.
By following these steps, users can leverage MySQL scheduled reports in SRM to streamline report distribution, automate data sharing, and ensure stakeholders receive regular updates tailored to their needs.