Cron job for email sheduled reports

Started by Meg, December 26, 2024, 08:31:14 PM

Previous topic - Next topic
Hello. On the Opnsense Gui under cron jobs dropdown list there is a cron job for Zenarmor email Sheduled Reports. I have email scheduled reports working daily in Zenarmor settings, but was trying to set the cron job to get a report every 12 hours. The cron job seems to be ignored and I only get a report once a day at the time set in Zenarmor scheduled reports settings. Does anyone know why this cron job doesn't work? I didn't make it, it was already in the dropdown list of cron jobs.

Zenarmor allows configuring report frequency only as daily, weekly, or monthly. Therefore, there is no direct setting to receive reports every 12 hours. However, you can manually set up a cron job in System > Settings > Cron to run the Zenarmor reporting script:

/usr/local/opnsense/scripts/OPNsense/Zenarmor/report-gen/send.py

Setting Up a Cron Job

1 - Go to System > Settings > Cron.
2 - Add a new cron job.
3 - Use the above command and set the schedule to 0 */12 * * * for every 12 hours.

Avoid Conflicts

Ensure the cron job does not overlap with Zenarmor's internal reporting schedule.
For example, if Zenarmor generates daily reports, set the cron job at a different time.

Alternative Solutions

1 - Syslog Integration: Export logs to a syslog server for analysis every 12 hours. Refer to the Zenarmor Syslog Integration documentation.
2 - API Usage: If you have technical expertise, use the Zenarmor API to create a custom script that generates reports every 12 hours.

For more information, check out the Zenarmor Documentation or contact our support team.

Thanks. I Have the cron job working now. This post can be marked solved

I'm glad to hear that your issue has been resolved! Thank you for your feedback.
If you need any further assistance, please don't hesitate to reach out.

Wishing you a great day!