I'm manually running a PHP database-maintenance script which takes around 10-15 minutes to complete. If my computer loses web connection during this time, is the script always fully completed on the server or does it stop somewhere along the way?

If it does stop, is there anything I can do in PHP or apache config to prevent this?