All very good points. Thank you very much. As I posted previously, I found that the problem was with the pico http server I was using. I tried similar code on my home Linux box running Apache and it worked fine. I do like the cron idea especially and will look at implementing it. As far as security, this particular server is not accessible from the Internet. It's for internal use only.
Thanks again!