Problem with Automatic Execution of GenericAgent

Moderator: crythias

Locked
OTRSRDNewbie
Znuny newbie
Posts: 69
Joined: 29 Apr 2016, 10:23
Znuny Version: 3.2, 5
Real Name: Dennis Cua
Company: N/A

Problem with Automatic Execution of GenericAgent

Post by OTRSRDNewbie »

Hi,

If I recall correctly the cronjob generic_agent and generic_agent-database. Are for running generic agent. But are they necessary if I created a Generic Agent in the frontend? Is the generic_agent or generic_agent_database needed to run the generic agent every monday to friday at 9 am to 6 pm?
I tried selecting minute, hour and days. It still does not execute, but the genericagents created with event based execution is working fine.

If I cp generic_agent.dist or generic_agent-database.dist and setup a cron schedule this will cause the genericagent in the database to run on a set schedule right irregardless of whether its a event deriven or schedule driven.

Say I have a genericagent - DoSomethingOnArticleCreate that runs every articlecreate and one every 9 am on thursday lets call it DoSomethingAt9Onthursday if I set the generic_agent-database to
#*/10 * * * * $HOME/bin/otrs.GenericAgent.pl -c db >> /dev/null. This will cause both genericagent to run every 10 minutes everyday right?

So what is the proper way. Or is this correct that for Automatic Execution I need to run a cron?

Image
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Problem with Automatic Execution of GenericAgent

Post by jojo »

for automatic execution cron is needed (versions before OTRS5).
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
OTRSRDNewbie
Znuny newbie
Posts: 69
Joined: 29 Apr 2016, 10:23
Znuny Version: 3.2, 5
Real Name: Dennis Cua
Company: N/A

Re: Problem with Automatic Execution of GenericAgent

Post by OTRSRDNewbie »

I see is it correct that genericagent.pl with the "-c db" parameter will run the genericagent the database but does not cause the genericagent to execute the job. Its still dictated by its schedule? Cause I read someone where it causes the generic agents in the database to run. Sort of a contradictory statement
Last edited by OTRSRDNewbie on 27 Sep 2016, 07:13, edited 1 time in total.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Problem with Automatic Execution of GenericAgent

Post by jojo »

generic_agent-database has to be used to run the generic afgent from database (which is filled via the frontend). Just activate all cronlets as described in the installation guidelines!

Also yo have to choose at least 1 setting per time column in the frontend.
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
OTRSRDNewbie
Znuny newbie
Posts: 69
Joined: 29 Apr 2016, 10:23
Znuny Version: 3.2, 5
Real Name: Dennis Cua
Company: N/A

Re: Problem with Automatic Execution of GenericAgent

Post by OTRSRDNewbie »

Ok thanks
OTRSRDNewbie
Znuny newbie
Posts: 69
Joined: 29 Apr 2016, 10:23
Znuny Version: 3.2, 5
Real Name: Dennis Cua
Company: N/A

Re: Problem with Automatic Execution of GenericAgent

Post by OTRSRDNewbie »

I tried it, the genericagent still didn't run. I'm not certain if its because its not being run as otrs.

I tried using /opt/otrs/bin/Cron.sh start otrs to restart cron. Then I checked crontab -l -u otrs, but I notice crontab -l -u root has the same set of schedules and commands. Using root I tried crontab -e and all the otrs scheduled commands are present.

Any suggestion or guide on how to proceed to troubleshoot?
Locked