Claus7
September 22nd, 2009, 03:54 PM
Hello,
I have a script that it runs ok when I invoke it in the folder I'm interested in.
The thing is that I want to make it run every 15 minutes or so and test if a process is running or not. If it finds that this process is not running I want it to finish running as well.
I used crontab for the situation, yet I face some problems with the commands I have in the script and I cannot find a workaround to this, so I do not want to follow such a procedure.
What I want to do is:
I want to run this script every 15 minutes (not all the time). If the process I want to test is on, then keep the script running, if not then stop.
I do not want to use a do loop with finite steps, as I do not know beforehand how much time the process I test will be running (e.g. for i=1, 100000...).
I want to achieve running this script as specific intervals of time, without using cron.
My thought up to now is using the wait command, yet I'm in the stage of how to implement this command in my code.
Thank you,
Regards!
I have a script that it runs ok when I invoke it in the folder I'm interested in.
The thing is that I want to make it run every 15 minutes or so and test if a process is running or not. If it finds that this process is not running I want it to finish running as well.
I used crontab for the situation, yet I face some problems with the commands I have in the script and I cannot find a workaround to this, so I do not want to follow such a procedure.
What I want to do is:
I want to run this script every 15 minutes (not all the time). If the process I want to test is on, then keep the script running, if not then stop.
I do not want to use a do loop with finite steps, as I do not know beforehand how much time the process I test will be running (e.g. for i=1, 100000...).
I want to achieve running this script as specific intervals of time, without using cron.
My thought up to now is using the wait command, yet I'm in the stage of how to implement this command in my code.
Thank you,
Regards!