Changes between Version 43 and Version 44 of TracCronPlugin
- Timestamp:
- Mar 4, 2015, 7:26:02 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracCronPlugin
v43 v44 15 15 * Task execution history '''new''' ''rss feed is available'' 16 16 17 So if you have any function for entry pointof a Trac related process and you want to add it as a job, Trac Cron Plugin is for you.17 So if you have any function of a Trac related process and you want to add it as a job, Trac Cron Plugin is for you. 18 18 19 19 The plugin provides an administration panel to help with scheduling: … … 32 32 33 33 Current stable release is '''0.3.1'''. 34 You can use easy_install or pip to download the latest package into your Python environment:34 You can use easy_install or pip to download and install the latest package into your Python environment: 35 35 36 36 {{{ … … 44 44 }}} 45 45 46 Alternatively, download the distributions files at [http://pypi.python.org/pypi/TracCronPlugin pypi] for source distributionsonly.46 Alternatively, download the distributions files at [http://pypi.python.org/pypi/TracCronPlugin pypi] for installation from source only. 47 47 48 48 == Source … … 53 53 == Example 54 54 55 Simply create in a module (.py) a class that implements the ICronTask and put it in sidethe plugins directory. Then you can either modify the trac.ini or use the Trac cron admin panel.55 Simply create in a module (.py) a class that implements the ICronTask and put it in the plugins directory. Then you can either modify the trac.ini or use the Trac cron admin panel. 56 56 57 57 === Writing a task … … 156 156 }}} 157 157 158 This key control the interval between each wake up of the ticker. The ticker thread periodically wakes up to see if there is task to execute. Then the ticker thread go sleep for the amount of minutes specified by this key. You should not have modify this value, except if you have system load issue. Default value is '''1'''.158 This key control the interval between each wake up of the ticker. The ticker thread periodically wakes up to see if there is a task to execute. Then the ticker thread goes to sleep for the amount of minutes specified by this key. You should not have to modify this value, except if you have system load issues. Default value is '''1'''. 159 159 160 160 === Task settings 161 161 162 For each task loaded by the Trac Component manager, Trac Cron Plugin ha vethose parameters. Let's look at a heart beat task.162 For each task loaded by the Trac Component manager, Trac Cron Plugin has those parameters. Let's look at a heart beat task. 163 163 164 164 ==== Enabling and disabling a task … … 169 169 }}} 170 170 171 This is the second way to enable or disable a task. Since ''ticker_enabled'' is global and so all tasks will be affected, this key only affects one task. If False, whatever schedule the task has, no t one will be triggered, so this is a way to disable a taskwhile keeping the schedule in place for the time you will enable the task. Default is '''True'''.171 This is the second way to enable or disable a task. Since ''ticker_enabled'' is global and so all tasks will be affected, this key only affects one task. If False, whatever schedule the task has, none will be triggered. So this is a way to disable a task, while keeping the schedule in place for the time you will enable the task. Default is '''True'''. 172 172 173 173 ==== Task scheduling … … 185 185 }}} 186 186 187 The goal of this scheduler is to trigger the task every hour. Provide minute when you want the task to be executed. Accept comma separated list of values. Default is no value.187 The goal of this scheduler is to trigger the task every hour. Provide the minute when you want the task to be executed. Accept comma separated list of values. Default is no value. 188 188 189 189 {{{ … … 192 192 }}} 193 193 194 This scheduler triggers a task that needs to be executed once a month. Provide the day in month and the hour when the task will be launched. The day is the index of the day starting at 1. Accepts comma separated value. Default is no value 194 This scheduler triggers a task that needs to be executed once a month. Provide the day in month and the hour when the task will be launched. The day is the index of the day starting at 1. Accepts comma separated value. Default is no value. 195 195 196 196 {{{ … … 199 199 }}} 200 200 201 This scheduler triggers a task that needs to be executed once a week. Provide the day in week and the hour when the task will be launched. The day is the index of the day starting at 0 (Monday is 0). Accept comma separated value. Default is no value 201 This scheduler triggers a task that needs to be executed once a week. Provide the day in week and the hour when the task will be launched. The day is the index of the day starting at 0 (Monday is 0). Accept comma separated value. Default is no value. 202 202 203 203 ==== Enabling and disabling a schedule 204 204 205 Each schedule can individually be enabled or disabled. This the configuration for daily scheduler:205 Each schedule can individually be enabled or disabled. This the configuration for the daily scheduler: 206 206 207 207 {{{ … … 229 229 === sleeping_ticket 230 230 231 This task reminds the reporter about orphaned tickets and the assigned user about sleeping ticket. An orphaned ticket is a ticket in new status since more than a given amount of day. An email notification is sent to the reporter in such a case. A sleeping ticket is a ticket assigned to an user, but the user either did not accept it or did not touch the ticket(make comment for example) since more than a given amount of day. The assigned user is notified in such a case. The delay is an optional parameter associated with each schedule. Default value is '''3 day'''. 231 This task reminds the reporter about orphaned tickets and the assigned user about sleeping tickets. 232 * An orphaned ticket is a ticket with status New since more than a given amount of days. An email notification is sent to the reporter in such a case. 233 * A sleeping ticket is a ticket assigned to an user, but the user either did not accept it or did not touch the ticket (add a comment for example) since more than a given amount of day. The assigned user is notified in such a case. 234 235 The delay is an optional parameter associated with each schedule. Default value is '''3 days'''. 232 236 233 237 === unreachable milestone … … 235 239 '''Note''': Since 0.2dev_r9388 236 240 237 This task scan still opened tickets in near milestone. Such a situation means that those tickets will probably not be part of the milestone. The task send a mail to user defined with ''unreachable_milestone.recipient'' (default is '''empty''') for each milestone with the list of still opened tickets. You may want to set the value to the release manager user. Reporter and owner are notified too but only for their tickets. The task looks for nearmilestone until '''3 days ahead'''. You can change the value with parameter either by setting ''unreachable_milestone.<schedule>.arg'' or in admin panel.241 This task scan still opened tickets in near milestone. Such a situation means that those tickets will probably not be part of the milestone. The task sends a mail to user defined with ''unreachable_milestone.recipient'' (default is '''empty''') for each milestone with the list of still opened tickets. You may want to set the value to the release manager user. Reporter and owner are notified too, but only for their tickets. The task looks for the nearest milestone until '''3 days ahead'''. You can change the value with parameter either by setting ''unreachable_milestone.<schedule>.arg'' or in admin panel. 238 242 239 243 This is an example of the mail for release manager: … … 265 269 === Auto postpone task 266 270 267 '''Note''': since 0.2dev_r9390 271 '''Note''': since 0.2dev_r9390. 268 272 269 273 Trac allow the administrator to postpone still opened ticket in a given milestone when he closes this milestone. But this is not mandatory. The auto postpone task will help to not forget opened tickets in closed milestone. The task look for such tickets and postpone them in the more recent still opened milestone. Milestone must have a due date. … … 271 275 === Ticket deadline task 272 276 273 '''Note''': since 0.3 277 '''Note''': since 0.3. 274 278 275 279 This task notify to ticket's reporter and owner when its ticket is near the deadline as a custom field. You can add a date field for ticket using [http://trac-hacks.org/wiki/DateFieldPlugin DateFieldPlugin]. Besides scheduler settings, there are the following options to configure when DateFieldPlugin is used: