04-30-2005
checking for a running process from korn cron
cron starts a job every 10 minutes via a korn shell - I need to determine if the previous process is still running before I allow the new process to start - HELP
I've tried ps -ef, etc but I have seen many situation where it says that the is running when it is not - any ideas on how to absolutely determine this
HELP
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am sorry, this is really trivial, yet I am not able to understand what the problem is!
I am using korn shell and running this script
#!/bin/ksh
keep=3
while ; do
echo $keep
keep=$(($keep-1))
done
I am getting this error: `keep=$' unexpected
I am not able to understand it because ... (1 Reply)
Discussion started by: Asty
1 Replies
2. Shell Programming and Scripting
I am starting to code a few ideas of customization and tasks improvements on the office UNIX machine. My first script (see below) only contains ALIAS commands. But for some reason, when I execute it, the alias are not executed. I suspect it is because of the "#!/bin/ksh" not being recognized or... (4 Replies)
Discussion started by: Browser_ice
4 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
I am new to perl and have been trying to write a short script to check a process.Though i havent reached to the stage where i can match the output.
I am trying to pass a variable x with value /opt/RGw/csbp-base/CSBP_BAT.01.00.05/csbp_BAT.01.00.05.jar
and then pass another variable... (2 Replies)
Discussion started by: pistachio
2 Replies
4. Shell Programming and Scripting
Hi Experts,
Is there any command by which i can chk that the cron process is running fine? Say i have scheduled the cron to run at 10 o clock every monday,Do i need to wait for the time it runs and then chk using ps -ef?
Please shed some light.
Thanks
Ashok. (2 Replies)
Discussion started by: Ashok_oct22
2 Replies
5. UNIX for Dummies Questions & Answers
How would i instruct the current shell to run the current script using the korn shell? (1 Reply)
Discussion started by: JamieMurry
1 Replies
6. UNIX for Dummies Questions & Answers
Hi
Please can someone explain to me how they would go about monitoring the performance of a process in Unix. Lets say that a user is running a process in Unix but it seems to be taking a long time, whereas it completed a lot quicker yesterday. How would you go about investigating what is causing... (1 Reply)
Discussion started by: Sunny Sid
1 Replies
7. Shell Programming and Scripting
Hi, i was looking for an answer for some trouble im having runing a script in the cron, thing is, that when i run it manually it works just fine. But when cron runs it, it just doenst work. I saw a reply on a similar subject, suggesting that the . .profile worked for you, but im kind of... (9 Replies)
Discussion started by: blacksteel1988
9 Replies
8. Solaris
Hi ,
I have removed a cron for particular user , but cron job seems to be running even after the cron entry is removed. The purpose of the cron was to sendmail to user ( it uses mailx utility )
I have restarted cron and sendmail service still user is getting mail alerts from the cron job. And... (4 Replies)
Discussion started by: chidori
4 Replies
9. Shell Programming and Scripting
Experts,
Not sure whether the problem described here is related with Unix or is it with Oracle Installation. Here is the description of the issue:
A new Unix server is setup as a part of Unix and Oracle upgradation activity for one of the Application, I work on.
One strange thing is... (2 Replies)
Discussion started by: Oracle_User
2 Replies
10. Shell Programming and Scripting
Suppose i have 3 different servers say x,y and z.
Im running some process say ABC and 40 instances for the same is being created.
In load sharing suppose on
server x, 20 instances are running
server y, 10 instances are running
server z, 10 instances are running.
While checking the... (1 Reply)
Discussion started by: ankitknit
1 Replies
CRON(8) System Manager's Manual CRON(8)
NAME
cron - clock daemon
SYNOPSIS
auth/cron [-c]
DESCRIPTION
Cron executes commands at specified dates and times according to instructions in the files /cron/user/cron. It runs only on an authentica-
tion server. Option -c causes cron to create /cron/user and /cron/user/cron for the current user; it can be run from any Plan 9 machine.
Blank lines and lines beginning with # in these files are ignored. Entries are lines with fields
minute hour day month weekday host command
Command is a string, which may contain spaces, that is passed to an rc(1) running on host for execution. The first five fields are integer
patterns for
minute 0-59
hour 0-23
day of month 1-31
month of year 1-12
day of week 0-6; 0=Sunday
The syntax for these patterns is
time : '*'
| range
range : number
| number '-' number
| range ',' range
Each number must be in the appropriate range. Hyphens specify inclusive ranges of valid times; commas specify lists of valid time ranges.
To run the job, cron calls host and authenticates remote execution, equivalent to running rx host command (see con(1)). The user's profile
is run with $service set to rx.
Cron is not a reliable service. It skips commands if it cannot reach host within two minutes, or if the cron daemon is not running at the
appropriate time.
EXAMPLES
Here is the job that mails system news.
% cat /cron/upas/cron
# send system news
15 8-17, 21 *** helix /mail/lib/mailnews
%
SOURCE
/sys/src/cmd/auth/cron.c
SEE ALSO
con(1), rc(1)
CRON(8)