Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » Cronjob to kill calendar duplicates
  •  
Computerdoc

Messages: 8
Karma: 0
Send a private message to this user
Hi folks,

i got Kerio Connect 7.2.3 running under a Mac OS X 10.6.8 Server system. All my clients using Entourage 2008 with Mac OS X 10.6.8. Since we are working with the public calendar i am struggeling with the well known duplicates. I talked to the Kerio support and they send me their script to kill the duplicates.

Right now i start the scipt manually. I tried to configure a cronjob to do this automatically but i wont work.

Here is the command i entered in the system crontab file:

0 0 * * * cd /Kerio/store/mail/domain.com/#public/Public\ Calendar/#msgs | ./dups.pl --killdups .

If i use the two commands seperatly in the terminal they work perfect. What am i doing wrong?

Can anybody help?

Thanks.

[Updated on: Thu, 08 March 2012 09:39]

  •  
TorW

Messages: 769
Karma: 9
Send a private message to this user
You can't use cd like this in a cron job. There is no output from the cd command which can be piped into the dups.pl program, plus you've used a backslash in the cd command argument. Cron jobs - as opposed to a logged-in user - does not have any environment when they run programs, so the ./ path before dups.pl does not make any sense either.

It's all a bit complicated, but ...

Instead of running dups.pl on the current dir (as denoted by the simple dot after the program), I'd do the whole thing like this (everything should be on one line):

0 0 * * *  /full/path/to/dups.pl --killdups /Kerio/store/mail/domain.com/#public/Public/Calendar/#msgs

[Updated on: Fri, 09 March 2012 00:16]

  •  
Computerdoc

Messages: 8
Karma: 0
Send a private message to this user
I used the backslash because theres a space in the name of my pubic calendar. Its called "Domains Calendar". Do you think this will be a problem? And the script is located in the #msgs folder of my public calendar.

This would be my command:

0 0 * * * /Kerio/store/mail/domain.com/#public/Domanis\ Calendar/#msgs/dups.pl --killdups /Kerio/store/mail/domain.com/#public/Domains\ Calendar/#msgs

Right?

This is what the Kerio support wrote:

I attached the script I think you are likely referring to.
Unzip it in the #msgs folder of the calendar.
Give the script execute rights: chmod +x dups.pl
This command will look for but not remove the duplicates: "./dups.pl ." (remove the double quotes)
This command will delete the duplicates: " ./dups.pl --killdups ."

[Updated on: Fri, 09 March 2012 09:27]

  •  
TorW

Messages: 769
Karma: 9
Send a private message to this user
Kerio Support's example is very generic and is probably writen that way to demonstrate the script arguments. Storing scripts deep in the mail storage is unusual, so copy it to /usr/local/bin. That way it will always be in the command path and you don't have to use the full path to it when you execute it.

I don't know how they coded the perl script, but it's usually better to have quotes around arguments with spaces in them. Do that also.

Now the command should look like this:

0 0 * * * dups.pl --killdups "/Kerio/store/mail/domain.com/#public/Domains  Calendar/#msgs"
Previous Topic: 0x80041200 er network fail
Next Topic: Sync Pending
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Wed Nov 22 12:06:09 CET 2017

Total time taken to generate the page: 0.00361 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.