Kernel::System::GenericAgent - to manage the generic agent jobs
All functions to manage the generic agent and the generic agent jobs.
Don't use the constructor directly, use the ObjectManager instead:
my $GenericAgentObject = $Kernel::OM->Get('Kernel::System::GenericAgent');
run a generic agent job
$GenericAgentObject->JobRun( Job => 'JobName', OnlyTicketID => 123, # (optional) for event based Job execution SleepTime => 100_000 # (optional) sleeptime per ticket in microseconds UserID => 1, );
returns a hash of jobs
my %List = $GenericAgentObject->JobList();
returns a hash of the job data
my %Job = $GenericAgentObject->JobGet(Name => 'JobName');
adds a new job to the database
$GenericAgentObject->JobAdd( Name => 'JobName', Data => { Queue => 'SomeQueue', ... Valid => 1, }, UserID => 123, );
deletes a job from the database
my $Success = $GenericAgentObject->JobDelete( Name => 'JobName', UserID => 123, );
returns:
$Success = 1; # or false in case of a failure
returns a hash of events for each job
my %List = $GenericAgentObject->JobEventList();
This software is part of the OTRS project (https://otrs.org/).
This software comes with ABSOLUTELY NO WARRANTY. For details, see the enclosed file COPYING for license information (GPL). If you did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.