Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

OS X launchd script for task.php


In the install documentation, it requires adding a cron item for running testrail background tasks.

The OS X replacement for cron (though cron is still available as of 10.6) is launchd. So I wrote the plist for the process that runs the task.php background tasks script every 60 seconds. Of course you’ll have to adjust both your path to php and your path to the task.php script.

[code]<?xml version="1.0" encoding="UTF-8"?>

Label com.gurock.testrail.tasks ProgramArguments /opt/local/bin/php /opt/www/testrail/task.php RunAtLoad StartInterval 60 UserName _www [/code]

Name the file:

and place in your LaunchDaemons folder:

Then run it:

Now your system will run the task script every 60 seconds!

To stop it from running, use:

If you make any edits to the plist file (such as changing the execution interval), you will have to unload and load the script to see the results.


Hello Michael,

Thanks a lot for posting your task script/description file, I’m sure other customers will find this useful too (especially as we have more and more customers who run TestRail on OS X). I’ve updated our installation documentation with a pointer to this thread:

Thanks again!