This Script can be used as a cronjob to make all clients do a hwaudit and swaudit on a regular basis. The script does only work with MySQL-Backend (probably also works when using free variant with only inventory in DB!)
Hint: In my variant I am using an event “request_graceful_reboot” which issues a popup requesting the user to reboot. This event has to be defined on every client. You could also remove that singe RPC-Call below.
./opsi-audit-cron.php [-d] [-t]
For Cronjobs you should use some output redirection. For example like that:
./opsi-audit-cron.php » /var/log/opsi/opsi-audit-cron.log
You can find the code here: https://forum.opsi.org/viewtopic.php?f=7&t=8271&p=36087#p36087