I have a script that is scheduled to run with task scheduler will download a file via FTP and import it to a mysql DB
How would I go about handling the retries if there is either a problem with the connection or something.
I tried going about it using the sleep(); function and using header("Location:file2.php")
then redirecting it back to the original thus causing a loop.
The reason I went about it this way is that if I just used a loop in the original page then it detected that eventually timed out.
What is the best way to go about it?