i've upgraded from OTRS 4 to 5 and i need some help for "translating" the old cronjobs in the new platform.
Prior to version 5 i used an embedded Perl script with all the options defined in the cron commad:
Code: Select all
/opt/otrs/bin/otrs.GenerateStats.pl -n 10013 -f Print -s "OTRS Service <sender@mycompany.com>" -r me@mycompany.com -m "Mail Body" >/dev/null
Code: Select all
/opt/otrs/bin/otrs.Console.pl Maint::Stats::Generate --number 10013 --format Print --mail-sender 'OTRS Service <sender@mycompany.com>' --mail-recipient me@mycompany.com --mail-body 'Mail Body'
Code: Select all
[Tue Nov 24 09:10:13 2015][Error][Kernel::System::Daemon::DaemonModules::BaseTaskWorker::_HandleError][51] There was an error executing Execute() in Kernel::System::Console::Command::Maint::Stats::Generate: Error: please provide option '--number'.
Generate (and send, optional) statistics which have been configured previously in the OTRS statistics module.
Usage:
otrs.Console.pl Maint::Stats::Generate --number ... [--params ...] [--target-filename ...] [--target-directory ...] [--format ...] [--separator ...] [--with-header] [--timezone ...] [--language ...] [--mail-sender ...] [--mail-recipient ...(+)] [--mail-body ...]
Options:
--number ... - Statistic number as shown in the overview of AgentStats.
[--params ...] - Parameters which should be passed to the statistic (e.g. Year=1977&Month=10, not for dynamic statistics).
[--target-filename ...] - Filename for the generated file.
[--target-directory ...] - Directory to which the generated file should be written (e.g. /output/dir/). If a target directory is provided, no email will be sent.
[--format ...] - Target format (CSV|Excel|Print) for which the file should be generated (defaults to CSV).
[--separator ...] - Defines the separator in case of CSV as target format (defaults to ';').
[--with-header] - Adds a heading line consisting of statistics title and creation date in case of Excel or CSV as output format.
[--timezone ...] - Target time zone (e.g. +2) for which the file should be generated (only provided, if the system use UTC as system time, the TimeZoneUser feature is active and for dynamic statistics).
[--language ...] - Target language (e.g. de) for which the file should be generated (will be OTRS default language or english as fallback if left empty).
[--mail-sender ...] - Email address which should appear as sender for the generated file.
[--mail-recipient ...(+)] - Recipient email address to which the generated file should be send.
[--mail-body ...] - Body content for the email which has the generated statistics file attached.
[--help] - Display help for this command.
[--no-ansi] - Do not perform ANSI terminal output coloring.
[--allow-root] - Allow root user to execute the command.
I really don't know how to write my command in the GUI, can anybody point me in the right direction?
Thanks in advance,
Treuz