Windows Cron Jobs

Moderator: crythias

Locked
davidbann
Znuny newbie
Posts: 92
Joined: 21 Jun 2010, 22:51
Znuny Version: 6.5.2
Real Name: David Bann
Location: South Africa

Windows Cron Jobs

Post by davidbann »

Hi there,

I have installed and configured OTRS. For some reason the cron jobs do not run though - I have to go to "Postmaster Mail Account" and manually click the "run now" link for the mail to be retreived and to then send out auto-responses. I have checked that the CronW windows service is running, and made sure that crontab.txt under \OTRS\CRONw\ contains the following:

Code: Select all

MAILTO="myname@domain.com"

*/10 * * * *    C:/PROGRA~2/OTRS/StrawberryPerl/perl/bin/perl.exe C:/PROGRA~2/OTRS/OTRS/bin/GenericAgent.pl -c db 

*/20 * * * *    C:/PROGRA~2/OTRS/StrawberryPerl/perl/bin/perl.exe C:/PROGRA~2/OTRS/OTRS/bin/GenericAgent.pl 

45 */2 * * *    C:/PROGRA~2/OTRS/StrawberryPerl/perl/bin/perl.exe C:/PROGRA~2/OTRS/OTRS/bin/PendingJobs.pl 

10 0 * * *  C:/PROGRA~2/OTRS/StrawberryPerl/perl/bin/perl.exe C:/PROGRA~2/OTRS/OTRS/bin/otrs.cleanup 

*/5 * * * *    C:/PROGRA~2/OTRS/StrawberryPerl/perl/bin/perl.exe C:/PROGRA~2/OTRS/OTRS/bin/PostMasterMailbox.pl 

01 01 * * * C:/PROGRA~2/OTRS/StrawberryPerl/perl/bin/perl.exe C:/PROGRA~2/OTRS/OTRS/bin/RebuildTicketIndex.pl 

55 */2 * * *    C:/PROGRA~2/OTRS/StrawberryPerl/perl/bin/perl.exe C:/PROGRA~2/OTRS/OTRS/bin/DeleteSessionIDs.pl --expired 

35 * * * *  C:/PROGRA~2/OTRS/StrawberryPerl/perl/bin/perl.exe C:/PROGRA~2/OTRS/OTRS/bin/UnlockTickets.pl --timeout 
Please let me know if there is anything else that I need to do in order to get this working..

Thanks
Mike_B
Moderator
Posts: 266
Joined: 12 Jan 2010, 18:16
Znuny Version: CVS HEAD

Re: Windows Cron Jobs

Post by Mike_B »

Hi David,

what happens if you run this from a CMD window:
C:/PROGRA~2/OTRS/StrawberryPerl/perl/bin/perl.exe C:/PROGRA~2/OTRS/OTRS/bin/PostMasterMailbox.pl
--
Mike
huntingbears.nl - @michielbeijen on Twitter
davidbann
Znuny newbie
Posts: 92
Joined: 21 Jun 2010, 22:51
Znuny Version: 6.5.2
Real Name: David Bann
Location: South Africa

Re: Windows Cron Jobs

Post by davidbann »

Mike_B wrote:Hi David,

what happens if you run this from a CMD window:
C:/PROGRA~2/OTRS/StrawberryPerl/perl/bin/perl.exe C:/PROGRA~2/OTRS/OTRS/bin/PostMasterMailbox.pl
--
Mike
It seems to work perfectly when I run manually from the command prompt - I tried a few times, and never had a problem. That's why I suspected Cronw as the problem - it runs fine from command prompt, and is a lot more reliable using task manager. As soon as I use Cronw, things fall apart, but not in a way that I can easily recreate the problem.

I'm not sure if there is a problem with cronw running on Win2003 64bit, but anyway - it all seems fine now that I am using Task Manager.

[update]
After changing my VPS host service provider, still running on win 64 bit, this problem went away. So seems the problem was in fact with the VPS that I was using rather than cronw or OTRS. Still not sure what caused it though.
[/update]
Locked