avatar glawrie Pro Apr 24. 2009. 10:55 am
Having just worked it out for our own system, I thought this might be of use to others.

AC documentation includes terse information about the need to set up 'scheduled tasks' (https://www.activecollab.com/support/index.php?pg=kb.page&id=81) that describes use of cron jobs to trigger the various scheduled events used by AC. The documentation includes a reference to Windows "Scheduled Tasks" system also as another way to get this working (on Windows servers).

Although cron is supported within OS X, its use has been deprecated in favour of launchd since the release of "Tiger" (OS X 10.4). The reasons for this are discussed here: http://developer.apple.com/documentation/MacOSX/Conceptual/BPSystemStartup/Articles/Daemons.html

launchd is a quite complex utility which relies on individual XML files to define each of the required timed events. So for the three events needed by Activecollab, you need to create three separate files. The files live in either /Library/LaunchAgents (for system based daemons) or ~/Library/LaunchAgents (for user specific daemons).

The XML files you need to create for this look like this - this one is for the hourly daemon - (edit to suit your installation). You will see the 'url' provided by AC is pasted into the middle of the block 'ProgramArguments' - you will need to change this for each type of trigger URL. The file calls curl to trigger the URL just like the cron example given in AC documentation.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>com.2GC.activecollabhourly</string>
	<key>ProgramArguments</key>
	<array>
		<string>/usr/bin/curl</string>
		<string>-s</string>
		<string>http://activecollabserver.com/hourly?code=XXXX</string>
		<string>&gt;</string>
		<string>/dev/null</string>
	</array>
	<key>StartInterval</key>
	<integer>3600</integer>
</dict>
</plist>


This file is saved in the required folder - convention has it called something like - com.Company.Uniquename (e.g. com.2GC.activecollabhourly )

Once you have created the file(s) you will need to reboot for the launchd system to pick up the request.

If you don't fancy XML file editing yourself, there is an excellent utility that will do all this for you (and more) called Lingon - download it from here: http://www.tuppis.com/lingon/

Hope you find this helpful :)
avatar Ilija Studen Staff Apr 24. 2009. 1:29 pm
Thanks for sharing. I didn't know that cron is deprecated on Mac OS :|
avatar Ilija Studen Staff Mar 17. 2010. 6:32 am
Info on how to configure launchd to trigger activeCollab's Scheduled Tasks is now part of Scheduled Tasks article in Administrator's Guide.