Help,
Ygor had previously answered my question of how to tell linux to run a script later, and how to specifiy how long the system should would wait till it executes the script.
echo "/path/to/script" | at now +5 minutes
This worked great and it seemed like it was exactly what I needed, but unfortunately I was asked to make the delay 5 seconds only instead of 5 minutes. This is a problem because the 'at' command only supports minutes,hours,weeks, and years. NO seconds!!!
Does anybody out there know of another way of doing this or of a similiar command to 'at' that is seconds compatible.
Any and all help and thought put into this is greatly appreciated.
Here is a more full description/history of my problem (for those interested):
I am writing a cgi script(web page) that takes input from the user and uses this input to modify the httpd.conf file. Since apache's configuration file has been modified apache needs to be reloaded so that it uses the new file. Unfortunately this cannot be done while apache is processing a web page. This causes the web page to bomb. So in answer to this I put my restart apache command in a seperate script and using the line at the top made the script only execute 5 minutes later. This means it runs completely seperate to the web page, and apache can then be succesfully reloaded.
Unfortunately it was decided that a minute was too long too wait, and 5 seconds would be more preferable, however the 'at' command doesn't support seconds. So here I am now looking for a command that will tell in linux to execute a script in 5 seconds time, and force the process to run seperate of the web page.
Any ideas?
Ygor had previously answered my question of how to tell linux to run a script later, and how to specifiy how long the system should would wait till it executes the script.
echo "/path/to/script" | at now +5 minutes
This worked great and it seemed like it was exactly what I needed, but unfortunately I was asked to make the delay 5 seconds only instead of 5 minutes. This is a problem because the 'at' command only supports minutes,hours,weeks, and years. NO seconds!!!
Does anybody out there know of another way of doing this or of a similiar command to 'at' that is seconds compatible.
Any and all help and thought put into this is greatly appreciated.
Here is a more full description/history of my problem (for those interested):
I am writing a cgi script(web page) that takes input from the user and uses this input to modify the httpd.conf file. Since apache's configuration file has been modified apache needs to be reloaded so that it uses the new file. Unfortunately this cannot be done while apache is processing a web page. This causes the web page to bomb. So in answer to this I put my restart apache command in a seperate script and using the line at the top made the script only execute 5 minutes later. This means it runs completely seperate to the web page, and apache can then be succesfully reloaded.
Unfortunately it was decided that a minute was too long too wait, and 5 seconds would be more preferable, however the 'at' command doesn't support seconds. So here I am now looking for a command that will tell in linux to execute a script in 5 seconds time, and force the process to run seperate of the web page.
Any ideas?