Schedule Import in OTRS using CRON Jobs

Moderator: crythias

Post Reply
puneet2906
Znuny newbie
Posts: 5
Joined: 24 Apr 2015, 14:24
Znuny Version: 5.0.19
Real Name: Puneet
Company: Nagarro

Schedule Import in OTRS using CRON Jobs

Post by puneet2906 »

Hi,

I am trying to import data in OTRS using Import facility. I created a Cron job file and upload it into folder: "C:\otrs\OTRS\var\cron\".
File has below lines
*/4 * * * * $HOME/bin/otrs.ImportExport.pl -n 000005 -i C:\temp\config-items\SAPComponents.csv>> /dev/null

CSV file is available, job is executing at every 4 mins but no data in imported. If I try it manually, everthing works fine.

Log is showing below error:
[Notice][main::_Status] Scheduler Service status request! PID 5672
[Debug][main::_Status][613] Scheduler Daemon status request! PID 5672
[Error][Kernel::System::GeneralCatalog::ItemGet][353] Need ItemID OR Class and Name!

Any help is appreciated!
Last edited by puneet2906 on 30 Apr 2015, 13:49, edited 1 time in total.
EXG133
Znuny expert
Posts: 217
Joined: 06 Aug 2012, 18:12
Znuny Version: 3.1.7 & 4.04

Re: Schedule Import in OTRS using CRON Jobs

Post by EXG133 »

Are you logged in as the OTRS user when you test it manually?
puneet2906
Znuny newbie
Posts: 5
Joined: 24 Apr 2015, 14:24
Znuny Version: 5.0.19
Real Name: Puneet
Company: Nagarro

Re: Schedule Import in OTRS using CRON Jobs

Post by puneet2906 »

Yes, I login from my Agent A/c and i have admin permissions.
puneet2906
Znuny newbie
Posts: 5
Joined: 24 Apr 2015, 14:24
Znuny Version: 5.0.19
Real Name: Puneet
Company: Nagarro

Re: Schedule Import in OTRS using CRON Jobs

Post by puneet2906 »

I need to schedule Import in OTRS 5 now. Any link or reference or documentation to schedule Import will be helpful.
root
Administrator
Posts: 3960
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Schedule Import in OTRS using CRON Jobs

Post by root »

Hi

Create the appropriate crontab entry in an own file in var/cron and execute bin/Cron.sh to enable it

- 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 ?
puneet2906
Znuny newbie
Posts: 5
Joined: 24 Apr 2015, 14:24
Znuny Version: 5.0.19
Real Name: Puneet
Company: Nagarro

Re: Schedule Import in OTRS using CRON Jobs

Post by puneet2906 »

Hi,

OTRS has moved the Import/Export command at following location
Kernel::System::Console::Command::Admin::ITSM::ImportExport::...

Enter this file path along with parameters to schedule Import/Export in OTRS. Example screenshot below
OTRS_Import.PNG
You do not have the required permissions to view the files attached to this post.
Post Reply