I am running a php script as a cron job that might take very long time to finish. It will create a massive xml file and save it.
What should I think of if I implement it?
One thing I do is set max_execution_time for a long time:
ini_set('max_execution_time', 300);
Is there anything else I should do? Increase memory limit? Does it help if put header "keep-alive"?
What can I do to make sure the script will always run until everything neccessary is done?