I have a code called "script.php" , it checks on my users and re-news their orders. However I want to create a button so that whenever I click the button; which is linked to "script.php" it will run. I created a button that does that:
<?php echo Html::anchor('../../script.php', 'Run Renewal Cron', array('class' => 'btn btn-success')); ?>
It works but the browser takes forever, since the script is running through many users. Is there a way that when I click this button, the script runs inside the server itself so if the browser was to close the script will keep running?
The code is just queries, selecting users, updating them, also adding new records to those users.