Server side msgprint is only useful for web request. Any msgprint during request’s lifecycle is sent to client in response.
What you need to do is different. You can achieve this in two ways:
client-side with setInterval() where every 5 minutes you poll a server-side method for evaluating whatever business logic you want (or it can be done fully client-side too)
CRON job like the previous post mentioned. But with cron job you probably need to emit events via socketio and client side needs to listen for that. Seems rather complex for this.
I need to show users a message every 5 minutes when no transaction is made on sales orders that are not completed.
This sounds very dystopian ngl. Not my place, but you should probably relook at the root cause of the problem you’re trying to solve with this