I need to generate a file every 20 minutes. What I would like to know is whether I would be better off writing the main file that outputs the .conf file in Perl or PHP.
I understand that in both cases I would be doing the following
So I guess it's really about speed.
Database wise I use MongoDB on a remote server. I was thinking about cloning the DB every 19 minutes and then the connecting script to remote DB would become a local DB script.
Which of these choices would you recommend?
One small key issue: I have been using PHP for over 10 years, and never used Perl.
The reason I ask this question is because my weakness in IT is while my strength is PHP i need to learn other languages and Asterisk uses Perl in some of their scripts, and I thought it is about time I learned another language.
The choice is yours. The task is extremely simple and either language will do the job satisfactorily.
Are you sure you want to gain experience with Perl on a live job? Perhaps code it in PHP and then do it again in Perl for the experience in your own time.
I'm not sure about your idea of cloning the DB every twenty minutes. Unless the database is extremely minimal it will take a significant amount of time to copy, and the database will be unavailable while you do it. Just connect, read your data, and get out.