I'm trying to schedule reports to be emailed to a manager. I have created the reports in Statistics, however I can't figure out how to schedule the job. I assume it will simply be a CRON job and I've found threads that tell people how to do it. However they are wanting to call mkStats.pl however I don't have one. I am assuming that they are running 2.x? What would be the script to do this on 3.1.11?
Thank you in advance for the help.
Scheduled Reports
Moderator: crythias
-
- Znuny newbie
- Posts: 16
- Joined: 16 Oct 2012, 19:19
- Znuny Version: 3.1.3
- Real Name: Fritz Freund
- Company: Intermountain Electric
Scheduled Reports
OTRS 3.1.11
Ubuntu Server 11.04
MySQL
Active Directory (Agent & Customer), SMTP/POP with MS Exchange, Multiple companies
Ubuntu Server 11.04
MySQL
Active Directory (Agent & Customer), SMTP/POP with MS Exchange, Multiple companies
Re: Scheduled Reports
bin/otrs.GenerateStats.pl
"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
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
-
- Znuny newbie
- Posts: 16
- Joined: 16 Oct 2012, 19:19
- Znuny Version: 3.1.3
- Real Name: Fritz Freund
- Company: Intermountain Electric
Re: Scheduled Reports
LOL....
wow I must just be blind...
wow I must just be blind...
OTRS 3.1.11
Ubuntu Server 11.04
MySQL
Active Directory (Agent & Customer), SMTP/POP with MS Exchange, Multiple companies
Ubuntu Server 11.04
MySQL
Active Directory (Agent & Customer), SMTP/POP with MS Exchange, Multiple companies
-
- Znuny newbie
- Posts: 16
- Joined: 16 Oct 2012, 19:19
- Znuny Version: 3.1.3
- Real Name: Fritz Freund
- Company: Intermountain Electric
Re: Scheduled Reports
So, in case anyone else is looking for details on doing this. here is what I did.
log into your system as root (or use sudo)
crontab -u <otrsuser> -e
I added the following line to run a weekly report:
0 7 * * 1 $HOME/bin/otrs.GenerateStats.pl -n 10020 -f CSV -r tom@domain.com -r fred@domain.com -r tony@domain.com -m "Weekly Open Ticket Report" -F WeeklyOpen
The Report runs every Monday at 7:00AM (0 7 * * 1) (Minute Hour DayOfMonth Month DayOfWeek)
The report number is 10020. (-n 10020)
It's sending as a CSV file. (see below for what I had to tweak) (-f CSV)
It's sending to 3 poeple. (-r tom@domain.com -r fred@.....)
The message is Weekly Open Ticket Report. (-m "Weekly Open Ticket Report")
And the file name is WeeklyOpen.csv. (-F WeeklyOpen)
CSV fix
So, to get CSV working correctly, I actually had to edit otrs.GenerateStats.pl to use a comma(,) instead of a semi-colon(;).
change the following on line 148 to a comma.
my $Separator = $Opts{S} || ',';
log into your system as root (or use sudo)
crontab -u <otrsuser> -e
I added the following line to run a weekly report:
0 7 * * 1 $HOME/bin/otrs.GenerateStats.pl -n 10020 -f CSV -r tom@domain.com -r fred@domain.com -r tony@domain.com -m "Weekly Open Ticket Report" -F WeeklyOpen
The Report runs every Monday at 7:00AM (0 7 * * 1) (Minute Hour DayOfMonth Month DayOfWeek)
The report number is 10020. (-n 10020)
It's sending as a CSV file. (see below for what I had to tweak) (-f CSV)
It's sending to 3 poeple. (-r tom@domain.com -r fred@.....)
The message is Weekly Open Ticket Report. (-m "Weekly Open Ticket Report")
And the file name is WeeklyOpen.csv. (-F WeeklyOpen)
CSV fix
So, to get CSV working correctly, I actually had to edit otrs.GenerateStats.pl to use a comma(,) instead of a semi-colon(;).
change the following on line 148 to a comma.
my $Separator = $Opts{S} || ',';
OTRS 3.1.11
Ubuntu Server 11.04
MySQL
Active Directory (Agent & Customer), SMTP/POP with MS Exchange, Multiple companies
Ubuntu Server 11.04
MySQL
Active Directory (Agent & Customer), SMTP/POP with MS Exchange, Multiple companies
Re: Scheduled Reports
did you try -S <seperator> ?
"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
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
-
- Znuny newbie
- Posts: 16
- Joined: 16 Oct 2012, 19:19
- Znuny Version: 3.1.3
- Real Name: Fritz Freund
- Company: Intermountain Electric
Re: Scheduled Reports
I didn't.
Do you by any chance have a site that has all the switches spelled out for the scripts?
Do you by any chance have a site that has all the switches spelled out for the scripts?
OTRS 3.1.11
Ubuntu Server 11.04
MySQL
Active Directory (Agent & Customer), SMTP/POP with MS Exchange, Multiple companies
Ubuntu Server 11.04
MySQL
Active Directory (Agent & Customer), SMTP/POP with MS Exchange, Multiple companies
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Scheduled Reports
try otrs.RandomScript.pl --help
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
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