Best practice triggering a process?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Best practice triggering a process?
# 1  
Old 04-21-2010
Best practice triggering a process?

Hi,

Since I staterd working as Unix sysadmin (about 3 years ago) I always used to trigger a process evaluating the conditions needed to this process to be executed. Recently I've change the company where I work, and they usually create a trigger file to start a process or to stop a process while another one is doing something.

Now I'm developing a little script that should do things if a field in a Oracle database table is changed from "idle" to "started". Which do you thing is the better way to do it? Connecting each 5 minutes to the DB and checking? Or creating a trigger file from de database when the value is changed in the table and let the script check if file exist?
# 2  
Old 04-21-2010
not so much a matter of best practices, as it's really more situational in nature...

What's the most reliable option under the circumstances? Is there a stored procedure that would be creating the spool file that drives this setting? Couldn't this SP just go ahead and initiate whatever it is that the "watcher" script is processing? Is there a need to keep it functioning even if there's a DB outage? Could the "watcher" script just do a quick look-up on the DB to capture the state as a ${variable:-default}? Do you mind having to manage the framework required to keep a file watcher in sync with the DB, and vice versa?

It's up to your scenario and most of this is purely academic, because the real best practice here is what works most effectively under your environment.

Hope this helps. Best of luck...!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Triggering a script using POSTFIX....

I have a mail server configured on my server (Postfix), I have a script which requires input to be provided to it. I would like to know if there is a possibility to trigger this script by sending mail to the server. This is what I am thinking: Once the mail arrives on server, the mail will... (6 Replies)
Discussion started by: davidbob
6 Replies

2. Shell Programming and Scripting

Terminating a process - is this code best practice?

Hi Folks - I am building a process to kill a list of services. Sometimes, there's a service that hangs therefore I need to add an additionla peice of code to kill all instances of a service if it exists. Here is that portion of code: echo... (10 Replies)
Discussion started by: SIMMS7400
10 Replies

3. Shell Programming and Scripting

Cron job not triggering.

Hi, I have scheduled a job using cron but the job is not getting triggred because of the following error. line 5: /env/env_setup.sh: No such file or directory But the file env_setup.sh is there in that location. /scripts/env -rwxrwxrwx 1 mysql mysql 974 Oct 24 10:41 env_setup.sh... (5 Replies)
Discussion started by: arijitsaha
5 Replies

4. Solaris

Scheduling job not triggering

I am scheduling job using Datastage tool, which tool is installed on solaris server. I can able to schedule jobs/sequences, its not trigering at specified scheduling trigerring time. but at specified job not starting automatically. Till that specified schedule time, i can able to see that the job... (6 Replies)
Discussion started by: sridhardwh
6 Replies

5. UNIX for Dummies Questions & Answers

Cron is running,but my job is not triggering.

Hi, I have scheduled a job previously and was running fine,but due to some issue i have commented it.Now the issue was solved and i have scheduled as below in crontab. 30 2 * * * /u01/srcdata/CSA/holding/common/script/QPLR_RegValrao.sh PROD Cron is running,but my job is not triggering. ... (1 Reply)
Discussion started by: mvennakula
1 Replies

6. UNIX for Dummies Questions & Answers

Unix coding for triggering informatica

Hi, I have very little knowledge with unix and pmcmd. I need help with a issue. I have to see whether a file has been dropped in a particular location/path. If the file dropped I have to check the last modified time, which should be greater than 8pmEST the prior day. If the file has been... (4 Replies)
Discussion started by: redwolves
4 Replies

7. HP-UX

Need to identify the process/app which is triggering the error "vmunix: file: table is full"

Hi, I'm seeing the error vmunix: file: table is full in syslog.log. Although changing the value of the kernel parameter nfile would make this error go away, how would I identify which process/application in the server is triggering this error? The server is a HP-UX B.11.11. Thanks in advance! (1 Reply)
Discussion started by: enchogas
1 Replies

8. Shell Programming and Scripting

Triggering my Unix script....

Hi All, i dont have any idea about perl scripting... i need some suggestion so that i can put my effort to find out the solution:D let me explain....one of my tedious task which will taken care by Unix shell script which i prepared. its a kind of routine work that i am running the... (4 Replies)
Discussion started by: Shahul
4 Replies

9. Shell Programming and Scripting

Triggering a Script Recursively With Different Parameter and in Different Process

Hi Every One I have a Compilation Script name scomp which takes the Program name as the command line argument I have around 10000 Programs to compile while each program takes around 10 mins to compile i have written a Mass Compile script Scripts which takes the list of programs as input... (15 Replies)
Discussion started by: pbsrinivas
15 Replies

10. UNIX for Dummies Questions & Answers

triggering utility

gang, I have a need for a utility that will 'watch' a directory and when a file pops into it, it will run a script on the file. More specifically, it will pgp decrypt the file that pops into the directory. Our Security guys aren't comfortable with the 'normal' users on our system being able... (1 Reply)
Discussion started by: hedrict
1 Replies
Login or Register to Ask a Question