You could run it using a cron job, or use a plugin to run it at certain times, perhaps storing the timestamp of the actual time it’s run and checking against that to determine when to run it again. The tricky part would be getting the login; having the application run with no security is not a good idea.
Another security enhancement I’ve done when using this is to have my .htaccess file deny direct access to its config file:
<Files config.inc.php>
order deny,allow
deny from all
</Files>
This doesn’t stop it from being included by the script; that doesn’t pass through the Apache server. It does stop somebody from requesting it directly.