You can schedule it every 10 minutes with cron. Example crontab entry :
0,10,20,30,40,50 * * * * /path/to_my_script.sh >> /path/to/logfile
This avoids one problem with sleep. Creep. Over the period of several months due to the way the scheduler works on a busy system, sleep 600 is guaranteed to sleep AT LEAST 600 seconds, but it could be more like 600.1 seconds. The start time of the script eases forward every day. Could end up starting several seconds late.
cron does not have this problem.
If this is a non-issue for you go with your sleep solution. That way you can check if it is running with
Otherwise you would have to look at a log file or employ some other less convenient method than ps.
hi all
I process is sleeping after 12 hours but i need to be run this to 24 hours but it goes in sleep mode after 12 hours what should i do to make process always running.Kindly give me suggestion. (0 Replies)
Hi..
I was unable to do (gcc code) which refers to the fork,wait,sleep and write..
what i want to do:
A process of father create (fork) a son and will sleep 90 seconds..After this, son process create a grandchild and will sleep 60 seconds..Grandchild process will sleep for 30 seconds..After... (3 Replies)
Hello Everyone:
I have the following code
int main()
{
system("/usr/OtherUser/bin/runX");
return 0;
}
runX must be executed with privileges from another user, how could I do that? I know the password for such user.
Thanks in advance (8 Replies)
Hi all,
I have a script that runs sftp with expect so I can login and send a file in a cronjob. I've installed this on a couple other servers and it has been fine. However, this time on this machine, it seems to be giving me an issue. It won't move past the spawn sftp command and return a... (3 Replies)
I am doing some file manipulation and then a bcp once all the files are processed. I need to do the following
for all files in dirctory
begin
-Step 1 use another shell/perl to format the file
done
in the end load into db using bcp
I want to do step 1 and step in a seperate... (2 Replies)
Hi Experts,
I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state.
On doing cat /proc/<pid>wchan showing the "__init_begin" in the output.
Can you please help me here... (0 Replies)
Hi Experts,
I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state.
On doing cat /proc/<pid>wchan showing the "__init_begin" in the output.
Can you please help me here... (1 Reply)
Hi Experts,
I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state.
On doing cat /proc/<pid>wchan showing the "__init_begin" in the output.
Can you please help me here... (6 Replies)