Custom Cron Job

Moderator: crythias

Locked
fledermaus
Znuny newbie
Posts: 5
Joined: 26 Feb 2015, 12:15
Znuny Version: 3.3.9
Real Name: Michael

Custom Cron Job

Post by fledermaus »

Hi all,

let me explain my problem: daily (or nightly), I will have a csv-file which is generated by another application on a shared drive. Using the otrsimportexport.pl script, I'm trying to import that file into a particular config::class. On top of that, it should become a cron job that runs every night.

Can someone tell me where to get started because things are going terrible wrong here, but no worries: it's a testserver ;-)

thanks,
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Custom Cron Job

Post by crythias »

Hi, and welcome to the Otterhub forums! Please take a moment to update your signature, and read my Need help? link in my signature for tips and tricks to get your question answered.

Note that your question is rather large in scope and covers multiple issues, each of which is itself worthy of its own topic. Is it possible to reduce your question to a specific area of concern and what the stopping point is for you to continue? (What part of the request *can* you do, what have you done, what have you tried, what's not working, what errors or results are you experiencing, how can one replicate your experience, etc.).
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
fledermaus
Znuny newbie
Posts: 5
Joined: 26 Feb 2015, 12:15
Znuny Version: 3.3.9
Real Name: Michael

Re: Custom Cron Job

Post by fledermaus »

Hello,

thanks for you answer. I'll get a little more in detail about my 'stopping point'. The operation I want to do, is to update the data of routers and other hardware every night. This consists of 2 operations:

1. import the data from a file to the respective classes (using otrs.importeport.pl)
2. create an automated job to perform the action in step 1 every night at 01.00am.

It's step 2 that I'm a bit confused about. Should I search for a solution using the web interface of OTRS or should I create a job on the Linux-level? I prefer that this timed operation would be done inside OTRS so I can avoid to be dependent of SysAdmins and Linux.

Thanks for all your advice,

kind regards.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Custom Cron Job

Post by crythias »

Linux level. Create a file in otrs/var/cron and restart otrs cron.
fledermaus wrote:I prefer that this timed operation would be done inside OTRS so I can avoid to be dependent of SysAdmins and Linux.
That's admirable, but it requires running a command line though you might attempt to do it via Generic Agent (CMD).
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
fledermaus
Znuny newbie
Posts: 5
Joined: 26 Feb 2015, 12:15
Znuny Version: 3.3.9
Real Name: Michael

Re: Custom Cron Job

Post by fledermaus »

Thank you very much for your help. I'm on it right now and I'll keep you posted.

Note to self (and other newbies): https://otrs.github.io/doc/manual/admin ... l#cronjobs
Locked