[thelist] sleep, etc to make a script not take resources

Bob Meetin bobm at dottedi.biz
Tue Oct 13 13:18:54 CDT 2009

This might seem like a silly question, but ...   I have a script that I 
will need to run against 30,000 lines or so in a text file (.csv).  It 
will need to do some pattern matching, then if it matches insert an 
entry into a database field.

I can do this using either  a PHP or shell script.  What is a smart way 
of running it so that it doesn't toast the CPU and draw the gods upon 
me? Can you interject a "sleep 1" or something else into the script or 
does that even help?

door #2 says that I set up PHP/MySQL locally, run the app, and upload 
the database file rather than runnning the program on the webhost server.

More information about the thelist mailing list