Hello everyone,
I would like to execute a generic agent task named "delete_tickets_older_than_1_year" on the cli,
because it's just more flexible than waiting for the response from the web service.
Best regards, Lukas
execute generic agents on CLI
Moderator: crythias
-
- Znuny newbie
- Posts: 28
- Joined: 15 Apr 2019, 09:34
- Znuny Version: 6.0.44
- Real Name: Lukas B.
-
- Administrator
- Posts: 4011
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: execute generic agents on CLI
Hi,
Configure a schedule for this job, like every Sunday. The job will be executed then by the daemon.
- Roy
Configure a schedule for this job, like every Sunday. The job will be executed then by the daemon.
- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
-
- Znuny newbie
- Posts: 28
- Joined: 15 Apr 2019, 09:34
- Znuny Version: 6.0.44
- Real Name: Lukas B.
Re: execute generic agents on CLI
Hello Roy,
I understand your point. I want to manually execute a generic agent task on the CLI,
is this possible?
Best regards, Lukas
I understand your point. I want to manually execute a generic agent task on the CLI,
is this possible?
Best regards, Lukas
-
- Administrator
- Posts: 4011
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: execute generic agents on CLI
Hi,
GenericAgents which are created via AdminGenericAgent can't be executed manually via CLI. Via CLI you can execute your own modules with the command bin/otrs.Console.pl Maint::GenericAgent::Run
You have to write your own module which execute the ticket search and loop over the result to delete the tickets.
I recommend using my first approach and keep the GA disabled when not required.
- Roy
GenericAgents which are created via AdminGenericAgent can't be executed manually via CLI. Via CLI you can execute your own modules with the command bin/otrs.Console.pl Maint::GenericAgent::Run
You have to write your own module which execute the ticket search and loop over the result to delete the tickets.
I recommend using my first approach and keep the GA disabled when not required.
- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?