OTRS 5 - Cronjobs

Moderator: crythias

Post Reply
pradeepspa
Znuny newbie
Posts: 68
Joined: 06 May 2016, 14:03
Znuny Version: 3.0.5
Real Name: Pradeep

OTRS 5 - Cronjobs

Post by pradeepspa »

Folks,

I was using OTRS 3 and now installed version 5s in parallel to compare both. In OTRS 5 , I have an issue of ticket getting created automatically. Every time I need to push "Fetchmail" option on "Postmaster-Mail-Account" to see the tickets in their respective queue. Comparing the cronjobs with version 3 , I see most of them are missing. At this point I am not sure , its the crontab entry making causing the issue. Could someone shed light on this please?

Here is the cronjob from two versions.

OTRS - 3
# cron/aaa_base - base crontab package
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: aaa_base.dist,v 1.7 2009/02/16 20:35:25 tr Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# Who gets the cron emails?
MAILTO="root@localhost"
# --
# cron/cache - delete expired cache
# Copyright (C) 2001-2010 xxx, http://otrs.org/
# --
# $Id: cache.dist,v 1.2 2010/11/22 12:15:35 mg Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# delete expired cache weekly (Sunday mornings)
20 0 * * 0 $HOME/bin/otrs.DeleteCache.pl --expired >> /dev/null
30 0 * * 0 $HOME/bin/otrs.LoaderCache.pl -o delete >> /dev/null
# --
# cron/fetchmail - fetchmail cron of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: fetchmail.dist,v 1.10 2009/02/16 20:53:10 tr Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# fetch every 5 minutes emails via fetchmail
#*/5 * * * * [ -x /usr/bin/fetchmail ] && /usr/bin/fetchmail -a >> /dev/null
#*/5 * * * * /usr/bin/fetchmail -a --ssl >> /dev/null
# --
# cron/generic_agent - otrs.GenericAgent.pl cron of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: generic_agent.dist,v 1.13 2009/11/04 12:27:57 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# start generic agent every 20 minutes
*/20 * * * * $HOME/bin/otrs.GenericAgent.pl >> /dev/null

# example to execute otrs.GenericAgent.pl on 23:00 with
# Kernel::Config::GenericAgentMove job file
#0 23 * * * $HOME/bin/otrs.GenericAgent.pl -c "Kernel::Config::GenericAgentMove" >> /dev/null
# --
# cron/generic_agent - otrs.GenericAgent.pl cron of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: generic_agent-database.dist,v 1.9 2009/11/04 12:27:57 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# start generic agent every 10 minutes
*/10 * * * * $HOME/bin/otrs.GenericAgent.pl -c db >> /dev/null
# --
# cron/pending_jobs - pending_jobs cron of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: pending_jobs.dist,v 1.12 2009/11/04 12:27:57 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# check every 120 min the pending jobs
45 */2 * * * $HOME/bin/otrs.PendingJobs.pl >> /dev/null
# --
# cron/postmaster - postmaster cron of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: postmaster.dist,v 1.9 2009/02/16 20:55:11 tr Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# check daily the spool directory of OTRS
#10 0 * * * * [ -e /etc/init.d/otrs ] && /etc/init.d/otrs cleanup >> /dev/null; [ -e /etc/rc.d/init.d/otrs ] && /etc/rc.d/init.d/otrs cleanup >> /dev/null
10 0 * * * $HOME/bin/otrs.cleanup >> /dev/null
# --
# cron/postmaster_mailbox - postmaster_mailbox cron of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: postmaster_mailbox.dist,v 1.3 2009/11/09 15:24:13 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# fetch emails every 10 minutes
*/1 * * * * $HOME/bin/otrs.PostMasterMailbox.pl >> /dev/null
# --
# cron/rebuild_ticket_index - rebuild ticket index for OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: rebuild_ticket_index.dist,v 1.10 2009/11/09 15:24:13 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# just every day
01 01 * * * $HOME/bin/otrs.RebuildTicketIndex.pl >> /dev/null
# --
# cron/session - delete old session ids of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: session.dist,v 1.12 2009/11/04 12:27:57 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# delete every 120 minutes old/idle session ids
55 */2 * * * $HOME/bin/otrs.DeleteSessionIDs.pl --expired >> /dev/null
# --
# cron/unlock - unlock old locked ticket of the OTRS
# Copyright (C) 2001-2009 xxx, http://otrs.org/
# --
# $Id: unlock.dist,v 1.11 2009/11/04 12:27:57 mn Exp $
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# unlock every hour old locked tickets
35 * * * * $HOME/bin/otrs.UnlockTickets.pl --timeout >> /dev/null


OTRS 5s:
# --
# Copyright (C) 2001-2017 xxx, http://otrs.com/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# Who gets the cron emails?
MAILTO="root@localhost"
# --
# Copyright (C) 2001-2017 xxx, http://otrs.com/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

# check OTRS daemon status
*/5 * * * * $HOME/bin/otrs.Daemon.pl start >> /dev/null
wurzel
Znuny guru
Posts: 3228
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: OTRS 5 - Cronjobs

Post by wurzel »

Hi,

your cronjobs in 5 are fine. The OTRS Daemon takes over the tasks.

http://doc.otrs.com/doc/manual/admin/st ... aemon.html


Florian
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
pradeepspa
Znuny newbie
Posts: 68
Joined: 06 May 2016, 14:03
Znuny Version: 3.0.5
Real Name: Pradeep

Re: OTRS 5 - Cronjobs

Post by pradeepspa »

Thanks for the response. I have checked the Daemon → Daemon::SchedulerCronTaskManager:: Task which have many tasks where few of them are,
Daemon::SchedulerCronTaskManager::Task###FetchMail
Daemon::SchedulerCronTaskManager::Task###MailAccountFetch
Besides having this task running, I need to manually push "fetchmail" to get tickets in. Is there any other place I should check to troubleshoot this? May be any command to see what happens when the daemon was running?
zzz
Znuny superhero
Posts: 889
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: OTRS 5 - Cronjobs

Post by zzz »

Hey pradeepspa,

you probably skipped something from the installation manual.

What needs to be done:
- mv /opt/otrs/var/cron/aaa_base.dist /opt/otrs/var/cron/aaa_base && mv /opt/otrs/var/cron/otrs_daemon.dist /opt/otrs/var/cron/otrs_daemon
- su -c "/opt/otrs/bin/otrs.Daemon.pl start" -s /bin/bash otrs && /opt/otrs/bin/Cron.sh start otrs

Might help:
Maint::Daemon::List - List available daemons.
Maint::Daemon::Summary - Shows a summary of one or all daemon modules.

Might also help:
/var/log/cron

Good luck
Professional OTRS, Znuny & OTOBO services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
pradeepspa
Znuny newbie
Posts: 68
Joined: 06 May 2016, 14:03
Znuny Version: 3.0.5
Real Name: Pradeep

Re: OTRS 5 - Cronjobs

Post by pradeepspa »

Thank you. I see that looks as expected. However, I now see the mail tickets coming normal after I fixed the issue on source end.
ronil21
Znuny newbie
Posts: 15
Joined: 16 May 2017, 20:41
Znuny Version: OTRS Version 5
Real Name: Ronil Estevam

Re: OTRS 5 - Cronjobs

Post by ronil21 »

Hi,

I have the same problem.

Can you please detail how you've resolved the issue?


Thanks
pradeepspa
Znuny newbie
Posts: 68
Joined: 06 May 2016, 14:03
Znuny Version: 3.0.5
Real Name: Pradeep

Re: OTRS 5 - Cronjobs

Post by pradeepspa »

I had an issue on my NMS not sending alarms properly. That was the issue.
Post Reply