Notifications in Time Tracker
You can use the Notifications
plugin in Time Tracker to email favorite reports on schedule depending on conditions
. For this feature to work, Time Tracker administrator must configure some external program, such as cron
on Linux or Task Scheduler
on Windows to episodically execute cron.php script located in the root of installation tree.
To configure, check the Notifications
box on the Plugins page for a group, click Save
and then click the Configure
Enable the Notifications plugin on the Team Profile page
The page that appears allows you to add a notification. On it, simply select a favorite report
, define your schedule
, and provide an email to send the report to. You need to have a favorite report created beforehand.
Adding a notification in Time Tracker
Internally, Time Tracker keeps notification descriptions in tt_cron table in its database. When you add a notification, it calculates its next run time and stores it in tt_cron.next field.
Processing occurs when cron.php script is executed. It compares tt_cron.next value with now and, if a report is due, sends it out and re-calculates its next run time. Therefore, timing accuracy actually depends on how often cron.php is called. To match cron spec precisely, you'll need to call it every minute but this will add unnecessary load on your server. Configure your timing wisely. We recommend hourly or even less frequent pings.
Below is an example of crontab entry to process notifications hourly at 5 minutes past each hour.
# timetracker ping to execute scheduled jobs
5 * * * * root /usr/bin/php /var/www/timetracker/cron.php
Time Tracker User Guide