02-20-2009
>I'm looping through different oracle databases
On the same box? If its so, my proposal should do the job...
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Can it be done? If so, how? I would like a script to contain the exit command, and log me off at script completion.
thanks (1 Reply)
Discussion started by: jpprial
1 Replies
2. UNIX for Advanced & Expert Users
Hi,
How can I call my shell script, when I execute 'exit' command?
For eg. I am logging out the root login by 'exit' command. My script 'colinfo' shold execute before logging out. I don't want to use any wrapper script. (2 Replies)
Discussion started by: sharif
2 Replies
3. Shell Programming and Scripting
Hi All,
I want to use EXIT command in a particular scenario.
In my script,its like that:-
if($vairable -eq 1);then
do this thing
do this
do this
fi
if($var2 -eq 1);then
do this
do this
fi
like this there are three four if conditions.
now I want is that if second condition is... (2 Replies)
Discussion started by: aruncser
2 Replies
4. Shell Programming and Scripting
Hi everyone,
when executing this command in unix:
echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error.
here is content of my script:
tdbsrvr$ vi hc.sh
"hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies
5. Shell Programming and Scripting
Hi all,
I have a shell script inside which i am executing another shell script. In the inner script im executing a command. i want the status of that command in the outer script to perform some validations.
How to get its status please help!!1
Im using ksh. (2 Replies)
Discussion started by: Jayaraman
2 Replies
6. Shell Programming and Scripting
This is probably a simple question, but I'm new with writing scripts for Linux (IPFire in this case) and Google wasn't helpful with this.
When creating a script, what is the best and/or proper way to have it exit automatically if the reboot or shutdown command is given? If that's even... (2 Replies)
Discussion started by: bartgrefte
2 Replies
7. Shell Programming and Scripting
Hi,
I am writing shell script to automate few use cases for CLI interface. We have CLI interface which has bunch of commands. I am trying to execute one of the commands 'exit' as part of automation to exit from CLI object (not from shell script) in my shell script.
My intension is to execute... (4 Replies)
Discussion started by: Mahesh Desai
4 Replies
8. Shell Programming and Scripting
My script needs to take a folder path to the location of a C program, and run the program until the user selects exit in his C program. The script needs to create a transcript to a text file while the C program is running.
Creating a transcript can be easily done with the script command but it... (2 Replies)
Discussion started by: syntax_eror
2 Replies
9. UNIX for Beginners Questions & Answers
Hi,
i am new here let me say HI for all.
now i have a question please:
i am sending one command to my machine to create 3 names.
if one of the names exists then the box return error message that already have the name but will continue to create the rests.
How i can break the command and... (7 Replies)
Discussion started by: Amiri
7 Replies
LEARN ABOUT DEBIAN
theschwartz::worker
TheSchwartz::Worker(3pm) User Contributed Perl Documentation TheSchwartz::Worker(3pm)
NAME
TheSchwartz::Worker - superclass for defining task behavior
SYNOPSIS
package MyWorker;
use base qw( TheSchwartz::Worker );
sub work {
my $class = shift;
my TheSchwartz::Job $job = shift;
print "Workin' hard or hardly workin'? Hyuk!!
";
$job->completed();
}
package main;
my $client = TheSchwartz->new( databases => $DATABASE_INFO );
$client->can_do('MyWorker');
$client->work();
DESCRIPTION
TheSchwartz::Worker objects are the salt of the reliable job queuing earth. The behavior required to perform posted jobs are defined in
subclasses of TheSchwartz::Worker. These subclasses are named for the ability required of a "TheSchwartz" client to do the job, so that the
clients can dispatch automatically to the approprate worker routine.
Because jobs can be performed by any machine running code for capable worker classes, "TheSchwartz::Worker"s are generally stateless. All
mutable state is stored in the "TheSchwartz::Job" objects. This means all "TheSchwartz::Worker" methods are class methods, and
"TheSchwartz::Worker" classes are generally never instantiated.
SUBCLASSING
Define and customize how a job is performed by overriding these methods in your subclass:
"$class->work( $job )"
Performs the job that required ability $class. Override this method to define how to do the job you're defining.
Note that will need to call "$job->completed()" or "$job->failed()" as appropriate to indicate success or failure. See TheSchwartz::Job.
"$class->max_retries( $job )"
Returns the number of times workers should attempt the given job. After this many tries, the job is marked as completed with errors (that
is, a "TheSchwartz::ExitStatus" is recorded for it) and removed from the queue. By default, returns 0.
"$class->retry_delay( $num_failures )"
Returns the number of seconds after a failure workers should wait until reattempting a job that has already failed $num_failures times. By
default, returns 0.
"$class->keep_exit_status_for()"
Returns the number of seconds to allow a "TheSchwartz::ExitStatus" record for a job performed by this worker class to exist. By default,
returns 0.
"$class->grab_for()"
Returns the number of seconds workers of this class will claim a grabbed a job. That is, returns the length of the timeout after which
other workers will decide a worker that claimed a job has crashed or faulted without marking the job failed. Jobs that are marked as failed
by a worker are also marked for immediate retry after a delay indicated by "retry_delay()".
USAGE
"$class->grab_job( $client )"
Finds and claims a job for workers with ability $class, using "TheSchwartz" client $client. This job can then be passed to "work()" or
"work_safely()" to perform it.
"$class->work_safely( $job )"
Performs the job associated with the worker's class name. If an error is thrown while doing the job, the job is appropriately marked as
failed, unlike when calling "work()" directly.
perl v5.10.0 2008-03-02 TheSchwartz::Worker(3pm)