[SOLVED]Change Fetch Emails time from 10 min to 1-3 min

Moderator: crythias

Locked
Asalman
Znuny newbie
Posts: 6
Joined: 22 Mar 2011, 18:23
Znuny Version: 3.0.5

[SOLVED]Change Fetch Emails time from 10 min to 1-3 min

Post by Asalman »

I been having problems trying figure out how to change the incoming IMAP fetch timer from 10 min to something shorter like 1-3 min. I need all incoming emails to update in OTRS faster, 10 min is way to long for my needs. Can anyone help?

I have been unsuccessful in changing the C:\Program Files\OTRS\OTRS\var\cron\postmaster_mailbox.dist (save failed) even tried it with OTRS stopped.
(saved failed)
From this:
# fetch emails every 10 minutes
*/10 * * * * $HOME/bin/otrs.PostMasterMailbox.pl >> /dev/null
to
# fetch emails every 10 minutes
*/1 * * * * $HOME/bin/otrs.PostMasterMailbox.pl >> /dev/null
Is there a proper way of doing this?

How do you change cron jobs in OTRS in windows?
All the guides/documentation I find are for Linux.

I have OTRS 3.0.5 installed on Windows Server 2007.
Incomming mail IMAP Working (Just to slow to update in OTRS)
Last edited by Asalman on 23 Mar 2011, 18:15, edited 1 time in total.
ptay
Znuny newbie
Posts: 85
Joined: 13 Jul 2010, 18:55
Znuny Version: 5.0.10

Re: Change Fetch Emails time from 10 min to 1-3 min

Post by ptay »

Not sure in Windows but in crontab you can put 0-59 in place of the first asterisk to run every minute.

Example:

Code: Select all

0-59 * * * * $HOME/bin/otrs.PostMasterMailbox.pl >> /dev/null
The "/" means repeat pattern so */10 means repeat every 10 minutes. This issue with using */10 format is not all operating systems support the repeat feature. In the case, you have to manually type what you want. Since you want every minute 24 x 7 x 365 then 0-59 should work for Linux/Unix. Worth a shot in Windows.

Let me know if it works, I'm curious.
Test:: OTRS 5.0.10 w/MariaDB 5.5.47 backend on RHEL7
Prod:: OTRS 5.0.10 w/MariaDB 5.5.47 backend on RHEL7
Asalman
Znuny newbie
Posts: 6
Joined: 22 Mar 2011, 18:23
Znuny Version: 3.0.5

Re: Change Fetch Emails time from 10 min to 1-3 min

Post by Asalman »

ptay wrote:Not sure in Windows but in crontab you can put 0-59 in place of the first asterisk to run every minute.

Example:

Code: Select all

0-59 * * * * $HOME/bin/otrs.PostMasterMailbox.pl >> /dev/null
The "/" means repeat pattern so */10 means repeat every 10 minutes. This issue with using */10 format is not all operating systems support the repeat feature. In the case, you have to manually type what you want. Since you want every minute 24 x 7 x 365 then 0-59 should work for Linux/Unix. Worth a shot in Windows.

Let me know if it works, I'm curious.

My problem is I cant edit this file.
C:\Program Files\OTRS\OTRS\var\cron\postmaster_mailbox.dist


Does anyone know how to edit this correctly? Or Windows alternative to accomplish the same results?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Change Fetch Emails time from 10 min to 1-3 min

Post by crythias »

you should copy the .dist file without the .dist extension, because .dist(ribution) files will be overwritten by updates (and ignored by cronw)
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
Asalman
Znuny newbie
Posts: 6
Joined: 22 Mar 2011, 18:23
Znuny Version: 3.0.5

Re: Change Fetch Emails time from 10 min to 1-3 min

Post by Asalman »

crythias wrote:you should copy the .dist file without the .dist extension, because .dist(ribution) files will be overwritten by updates (and ignored by cronw)
I can save a copy of the Postmaster_mailbox but can not save it in that directory. Can you elaborate on how to do what your trying to explain above, I would greatly appreciate it.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Change Fetch Emails time from 10 min to 1-3 min

Post by crythias »

Start, cmd(click ok)
cd c:\path\to\otrs\var\cron
copy postmaster_mailbox.dist postmaster_mailbox
exit
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
Asalman
Znuny newbie
Posts: 6
Joined: 22 Mar 2011, 18:23
Znuny Version: 3.0.5

Re: Change Fetch Emails time from 10 min to 1-3 min

Post by Asalman »

c:\Program Files\OTRS\OTRS\var\cron>copy postmaster.dist postmaster_mailbox
Access is denied.
0 file(s) copied.

c:\Program Files\OTRS\OTRS\var\cron>
It seems like I can not make write in this directory, however I do have the copy of the file on my desktop edited.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Change Fetch Emails time from 10 min to 1-3 min

Post by crythias »

It's because it's in program files. Right click on the command prompt and run as administrator.
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
Asalman
Znuny newbie
Posts: 6
Joined: 22 Mar 2011, 18:23
Znuny Version: 3.0.5

Re: Change Fetch Emails time from 10 min to 1-3 min

Post by Asalman »

crythias wrote:It's because it's in program files. Right click on the command prompt and run as administrator.
OK it worked! I was able to edit this file now, that was it was not ran as administrator in CMD. I will test out now the response to incoming tickets and let you know how it goes.
Asalman
Znuny newbie
Posts: 6
Joined: 22 Mar 2011, 18:23
Znuny Version: 3.0.5

Re: Change Fetch Emails time from 10 min to 1-3 min

Post by Asalman »

Thanks Again Crythias, emails coming much quicker now.
srivatsatatti
Znuny newbie
Posts: 85
Joined: 25 Jan 2011, 06:54
Znuny Version: OTRS 3
Company: eStomi Technologies Pvt Ltd
Contact:

Re: [SOLVED]Change Fetch Emails time from 10 min to 1-3 min

Post by srivatsatatti »

I have done this setup in my system it worked well. I am fetching mails per min. i have observed that only around 30 mails are fetched at a time. can we increase these number??
OTRS 3.2.x, Linux Ubuntu, Mysql 5.1.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: [SOLVED]Change Fetch Emails time from 10 min to 1-3 min

Post by crythias »

If you're fetching too frequently, you'll have problems if you get lots of messages. If you're using linux, you might have better results with procmail, which handles the tickets immediately rather than fetch. Check the wiki.
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
Locked