If you mean directly after having started the application then have a look at the ‘After startup’ microflow in the Runtime-tab of your Project Settings.
You could use the Javascript Snippet widget to perform that action on loading of the homepage. This should be triggered on successful loading of that page.
You can add some javascript in your index.html page, or whatever first page is people get redirected to.
Just add it in the body:
<head>
...
</head>
<body>
<script>
**Your script**
</script>
<script src="mxclientsystem/mxui/mxui.js?{{cachebust}}"></script>
</body>