Problem when using cron to auto-send statistics reports

Moderator: crythias

Post Reply
dwg
OTRS newbie
Posts: 17
Joined: 08 Jun 2011, 07:08
OTRS Version?: 3.08

Problem when using cron to auto-send statistics reports

Post by dwg » 11 Nov 2011, 21:47

Does this problem ring a bell for anyone? It is probably an OS problem more than an OTRS problem but any help would be welcomed. Thanks!

In order to auto-send a scheduled statistics report, I am following the method used in this post: http://forums.otrs.org/viewtopic.php?f=62&t=9829

It works great except that an error ticket is generated each time an email is sent.

My crontab entry looks like this and sends every day at 4:00pm:
00 16 * * * $HOME/bin/otrs.GenerateStats.pl -n 10017 -f Print -r email@domain.com-m 'Report Description' >> /dev/null

At 4:00pm I receive an email with the PDF report (GREAT!) but also notice that a new ticket is created in OTRS showing an error from running the otrs.GenerateStats.pl comand (Confusing!)

The contents of the new error ticket are pasted below.

If I run the following otrs.GenerateStats.pl command manually as otrs user the email sends successfully and no ticket is created. I do, however, see the same messages in the console that are used to generate the ticket.
Manual command: $HOME/bin/otrs.GenerateStats.pl -n 10017 -f Print -r email@domain.com-m 'Report Description'

Here are the contents of the ticket that is created each time the above command is run by cron:
Ticket Subject: Cron <otrs@lsshd01> $HOME/bin/otrs.GenerateStats.pl -n 10018[...]
Ticket Detail:
Use of uninitialized value in numeric gt (>) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 258.
Use of uninitialized value in numeric gt (>) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 258.
Use of uninitialized value in numeric gt (>) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 258.
Use of uninitialized value in numeric gt (>) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 258.
Use of uninitialized value $delta in addition (+) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 374.
Use of uninitialized value $v in numeric ne (!=) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 374.
Use of uninitialized value $v in numeric eq (==) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 375.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
411.
Use of uninitialized value $current in addition (+) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 426.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value $delta in addition (+) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 374.
Use of uninitialized value $v in numeric ne (!=) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 374.
Use of uninitialized value $v in numeric eq (==) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 375.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
411.
Use of uninitialized value $current in addition (+) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 426.
Use of uninitialized value $delta in addition (+) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 374.
Use of uninitialized value $v in numeric ne (!=) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 374.
Use of uninitialized value $v in numeric eq (==) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 375.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
411.
Use of uninitialized value $current in addition (+) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 426.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value $delta in addition (+) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 374.
Use of uninitialized value $v in numeric ne (!=) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 374.
Use of uninitialized value $v in numeric eq (==) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 375.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
411.
Use of uninitialized value $current in addition (+) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 426.
Use of uninitialized value $delta in addition (+) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 374.
Use of uninitialized value $v in numeric ne (!=) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 374.
Use of uninitialized value $v in numeric eq (==) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 375.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
411.
Use of uninitialized value $current in addition (+) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 426.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value $delta in addition (+) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 374.
Use of uninitialized value $v in numeric ne (!=) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 374.
Use of uninitialized value $v in numeric eq (==) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 375.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
411.
Use of uninitialized value $current in addition (+) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 426.
Use of uninitialized value $delta in addition (+) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 374.
Use of uninitialized value $v in numeric ne (!=) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 374.
Use of uninitialized value $v in numeric eq (==) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 375.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
411.
Use of uninitialized value $current in addition (+) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 426.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
353.
Use of uninitialized value $delta in addition (+) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 374.
Use of uninitialized value $v in numeric ne (!=) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 374.
Use of uninitialized value $v in numeric eq (==) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 375.
Use of uninitialized value in pack at /usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line
411.
Use of uninitialized value $current in addition (+) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 426.

crythias
Moderator
Posts: 10096
Joined: 04 May 2010, 18:38
OTRS Version?: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Problem when using cron to auto-send statistics reports

Post by crythias » 12 Nov 2011, 00:10

It's something that's known (?) but I don't think there's an adequate solution. HOWEVER, if you're getting a ticket, it's because cron bounces notifications to your otrs box. In *one* of your otrs/var/cron/files (probably the one closest to the beginning of the alphabet) add

MAILTO=someaddress@thatmightgetanemail.com
or
MAILTO=""

and restart cron:
otrs/bin/Cron.sh restart otrs

Info that OTRS knows about the errors:
http://www.digipedia.pl/usenet/thread/14579/14/
OTRS 5.0.x (private/testing/public) on Linux with MySQL database. Also on github.
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

dwg
OTRS newbie
Posts: 17
Joined: 08 Jun 2011, 07:08
OTRS Version?: 3.08

Re: Problem when using cron to auto-send statistics reports

Post by dwg » 15 Nov 2011, 05:47

Thank you! MAILTO="" worked like magic.

Mike_B
Moderator
Posts: 266
Joined: 12 Jan 2010, 18:16
OTRS Version?: CVS HEAD

Re: Problem when using cron to auto-send statistics reports

Post by Mike_B » 16 Jan 2013, 11:32

Hi,

I filed a bug report for it:
see also http://bugs.otrs.org/show_bug.cgi?id=9057

if you remove the '-w' from the first line of bin/otrs.GenerateStats.pl the warnings will disappear.

We applied this fix to the upcoming versions of OTRS (3.1.13 and 3.2.0rc1).

--
Mike
huntingbears.nl - @michielbeijen on Twitter

Post Reply