: have a site that runs on a Apache/1.3.1 Cobalt (Unix) server. I would
: like to know if it is possible to have a CGI script execute on startup
: and remain present. I share space on this server. The site Admin isnt
: the
: helpful type if possible I would like to enable this myself. Ive tried
: to
: execute the program from browser and telnet command line but it appears
: to
: terminate when exiting or logging off. P.S The script is designed to
: continuously
: monitor files in a directory.
As a user you could start your script from the command line using
"nohup". Do a "man nohup", without the quotes, on the servers command
line. The syntax for nohup should be something like:
nohup your_command
where your_command is the script you want to execute. This will allow
your script to function without hangups (well, your script will
terminate should your System Admin. kill the process or shutdown the
machine). However (this is IMPORTANT), Systems Administrators tend
not to like it when users run commands that are going to sit in memory
eating up processing cycles. You may want to re-visit this with your
Administrator. The person might come across as not being helpful when
really she/he is just trying to stop you from doing something that
could affect the system's processing. You say your script is designed
to "continuously" monitor files in a directory. Does your script check
the status of the directory, go to sleep for a period of time, then
re-check the status of the directory? Or does it actually continually
check the status of the directory? If it is the latter, you may want
to re-design your script. Your Administrator might be more receptive
if you could tell her/him "Well, it checks the directory, sleeps for
(insert your time increment here) then re-checks the directory, then
sleeps again...."
John