Hi,
I am new to this forum and unix too. I have just started learning unix. As I was going through the first chapter, I read that unix is multitasking, multiprogramming, multiprocessing and multiuser OS.
My question is: Is there any difference between a TASK and a PROCESS. How are PROCESS... (2 Replies)
I have a file contains
TASK gsnmpproxy {
CommandLine = $SMCHOME/bin/gsnmpProxy.exe
}
TASK gsnmpdbgui {
CommandLine = $SMCHOME/bin/gsnmpdbgui.exe
I would like to comment and than uncomment specific task eg TASK gsnmpproxy
Pls suggest how to do in shell script (9 Replies)
I have an ASCII file that I receive on a monthly bases that is fixed length. I break the file into separate files based on a 5 character numerical sequence. I have 20 different sequences I have to find.
the input file looks something like this
xy-ins 2008yuthnrlsinrthsntwilgrha33260001... (4 Replies)
I have an task definition listing xml file that contains a list of tasks such as
<TASKLIST
<TASK definition="Completion date" id="Taskname1" Some other
<CODE name="Code12"
<Parameter pname="Dog" input="5.6" units="feet" etc /Parameter>
<Parameter... (3 Replies)
I need to automate a manual task using shell scripting. The scenario is like :-
#!/usr/bin/sh
echo "please enter the name of the lab server to test ..."
read s
ssh $s
This is peace of the script which will allow me to login to another server using "ssh". I have a conf file which is having... (4 Replies)
Hi all,
I'm newbie and stuck here. Thanks for any help.
Input(txt file)
a b X
c d Y
e f Z
g h W
Requested output:
a b X Y
c d Y X
e f Z W
g h W Z
Please use code tags when posting data and code samples! (10 Replies)
I have a simple task for my school work. I'm new with unix, so i need help.
I need to write a scenario. Task is. From created txt file read first 3 words and create a 3 catalogs with those 3 words. 2 of those new catalogs should be transferred to other directory. If someone could help me just... (1 Reply)
Dear All,
I am relatively new to UNIX and wanted to accomplish a simple task which should be automated. That's why I need your help. I shall briefly describe what I want.
Basically, there is a process (X) (related to a particular software which I am using in my system) which automatically... (5 Replies)
Discussion started by: Samiran Dam
5 Replies
LEARN ABOUT DEBIAN
gearman::task
Gearman::Task(3pm) User Contributed Perl Documentation Gearman::Task(3pm)NAME
Gearman::Task - a task in Gearman, from the point of view of a client
SYNOPSIS
my $task = Gearman::Task->new("add", "1+2", {
.....
};
$taskset->add_task($task);
$client->do_task($task);
$client->dispatch_background($task);
DESCRIPTION
Gearman::Task is a Gearman::Client's representation of a task to be done.
USAGE
Gearman::Task->new($func, $arg, \%options)
Creates a new Gearman::Task object, and returns the object.
$func is the function name to be run. (that you have a worker registered to process)
$arg is an opaque scalar or scalarref representing the argument(s) to pass to the distributed function. If you want to pass multiple
arguments, you must encode them somehow into this one. That's up to you and your worker.
%options can contain:
o uniq
A key which indicates to the server that other tasks with the same function name and key will be merged into one. That is, the task
will be run just once, but all the listeners waiting on that job will get the response multiplexed back to them.
Uniq may also contain the magic value "-" (a single hyphen) which means the uniq key is the contents of the args.
o on_complete
A subroutine reference to be invoked when the task is completed. The subroutine will be passed a reference to the return value from the
worker process.
o on_fail
A subroutine reference to be invoked when the task fails (or fails for the last time, if retries were specified). No arguments are
passed to this callback. This callback won't be called after a failure if more retries are still possible.
o on_retry
A subroutine reference to be invoked when the task fails, but is about to be retried.
Is passed one argument, what retry attempt number this is. (starts with 1)
o on_status
A subroutine reference to be invoked if the task emits status updates. Arguments passed to the subref are ($numerator, $denominator),
where those are left up to the client and job to determine.
o retry_count
Number of times job will be retried if there are failures. Defaults to 0.
o high_priority
Boolean, whether this job should take priority over other jobs already enqueued.
o timeout
Automatically fail, calling your on_fail callback, after this many seconds have elapsed without an on_fail or on_complete being called.
Defaults to 0, which means never. Bypasses any retry_count remaining.
o try_timeout
Automatically fail, calling your on_retry callback (or on_fail if out of retries), after this many seconds have elapsed. Defaults to 0,
which means never.
$task->is_finished
Returns bool: whether or not task is totally done (on_failure or on_complete callback has been called)
perl v5.10.1 2009-10-05 Gearman::Task(3pm)