Gossamer Forum
Home : General : Perl Programming :

Process Running...

Quote Reply
Process Running...
Hi. I'm trying to write a script that will automate the process of doing DMOZ dumps. Basically, the process would be;

1) Run itself every 30 mins (to see what is going on with the server, i.e if nph-import is running)
2) Check to see if the service is running (nph-import.cgi)
3) If it has stopped, the process is assumed to have been completed. Then it will execute SQL queries to dump all the required tables into a SQL dump on my server.
4) Once the dump has been done all of the info will be removed, and a new cron file will be written to work on the new category.
5) The above will continue until the end of all the categories (i'm estimating it will take a week, possibly 1 and a half to complete the whole directory). Then the process will not be run again until 2 weeks after, which will then re-import the new content RDF file and start the process again on the new dumps.

However, the problem I am finding is that I'm not sure how to work out if a process is running. I know it must be possible to do with a command line, as WebMin uses something to show all the running processes on one of its admin page.

Does anyone have any ideas on this one?

Thanks

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Subject Author Views Date
Thread Process Running... Andy 4367 Jan 6, 2002, 9:48 AM
Thread Re: [AndyNewby] Process Running...
Paul 4244 Jan 6, 2002, 11:06 AM
Thread Re: [RedRum] Process Running...
Andy 4262 Jan 6, 2002, 11:39 AM
Thread Re: [AndyNewby] Process Running...
Paul 4291 Jan 6, 2002, 11:52 AM
Thread Re: [RedRum] Process Running...
Andy 4270 Jan 7, 2002, 12:35 AM
Thread Re: [AndyNewby] Process Running...
Paul 4347 Jan 7, 2002, 2:58 AM
Post Re: [RedRum] Process Running...
Andy 4262 Jan 7, 2002, 3:06 AM
Post Re: [RedRum] Process Running...
Andy 4217 Jan 7, 2002, 9:13 AM