Changes between Version 49 and Version 50 of TracCronPlugin


Ignore:
Timestamp:
Jan 24, 2016, 9:33:46 AM (8 years ago)
Author:
figaro
Comment:

Further cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • TracCronPlugin

    v49 v50  
    11[[PageOutline(2-5,Contents,pullout)]]
    22
    3 = Trac Cron Plugin
     3= Trac Cron task scheduler
    44
    55== Description
    66
    7 This plugin adds a scheduler inside the Trac process that can handle any sort of task written in the Python language. It allows you to have any function of a Trac related process to be added as a job.
     7This plugin adds a scheduler inside the Trac process that can handle any task written in the Python language. It allows you to have any function of a Trac related process to be added as a job.
    88
    99Key features:
     
    3232Current stable release is '''0.3.1'''.
    3333
    34 You can use easy_install or pip to download and install the latest package into your Python environment:
     34You can use `easy_install` or `pip` to download and install the latest package into your Python environment:
    3535{{{#!sh
    3636easy_install TracCronPlugin
     
    4646== Source
    4747
    48 You can clone TracCronPlugin from [https://bitbucket.org/t2y/trac.plugins.traccron here] using Mercurial, or browse the source.
     48You can browse the source or clone TracCronPlugin from [https://bitbucket.org/t2y/trac.plugins.traccron BitBucket] using Mercurial.
    4949Originally, TracCronPlugin source is hosted in [/svn/traccronplugin trac-hacks.org svn], but is no longer maintained there.
    5050
    5151== Example
    5252
    53 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.
     53Simply 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 file or use the Trac cron admin panel.
    5454
    5555=== Writing a task
    5656
    57 You have to write a Python class that inherits ICronTask:
     57To implement a task you have to write a Python class that inherits ICronTask:
    5858{{{#!python
    5959class ICronTask(Interface):
     
    111111
    112112Since tasks are components you just have to put the class definition of your task in a Python module in the plugins directory.
    113 You can either create a .py file and put it in the plugins directory. Alternatively you can package the .py file into an egg and leave it in the plugins directory.
    114 
    115 TracCronPlugin will show up the task in the administration panel.
     113You can either create a .py file and put it in the plugins directory or you can package the .py file into an egg and leave it in the plugins directory.
     114
     115TracCronPlugin will show the task in the administration panel.
    116116
    117117== Configuration
    118118
    119 The plugin can be entirely configured from either trac.ini or the administration panel.
     119The plugin can be entirely configured from either within the trac.ini file or from the administration panel.
    120120The section name of TracCronPlugin is `traccron`, here is a full sample:
    121121
     
    170170}}}
    171171
    172 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:
     172The goal of this scheduler is to trigger the task every hour. Provide the minute when you want the task to be executed. Accepts comma separated values. Default is no value:
    173173
    174174{{{#!ini
     
    224224'''Note''': Since 0.2dev_r9388
    225225
    226 This task scans 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 the admin panel.
     226This task scans still opened tickets in near milestone. Such a situation means that those tickets will probably not be part of the milestone. The task sends an email to the 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 the admin panel.
    227227
    228228This is an example of the mail for release manager:
     
    256256'''Note''': since 0.2dev_r9390.
    257257
    258 Trac allows 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 a closed milestone. The task looks for such tickets and postpones them in the more recent still opened milestone. Milestone must have a due date.
     258Trac allows the administrator to postpone still opened tickets 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 a closed milestone. The task looks for such tickets and postpones them in the more recent still opened milestone. Milestone must have a due date.
    259259
    260260=== Ticket deadline task
     
    343343}}}
    344344
    345 Please refer to cron documentation for more details [http://en.wikipedia.org/wiki/CRON_expression cron syntax].
     345Please refer to cron documentation for more details on the standard [wikipedia:CRON_expression cron syntax].
    346346
    347347== Bundled Listener
     
    349349=== Email notification of task event
    350350
    351 This listener notify by email about task execution. You can choose the number of event sent by email by setting the value of ''email_task_event.limit''. When the listener has received at least the number of task execution, it will send the mail. Default is '''1'''. The value of ''email_task_event.recipient'' '''must''' be filled, otherwise no mail will be sent.
     351This listener notifies by email about task execution. You can choose the number of event sent by email by setting the value of ''email_task_event.limit''. When the listener has received at least the number of task execution, it will send the email. Default is '''1'''. The value of ''email_task_event.recipient'' '''must''' be filled, otherwise no email will be sent.
    352352
    353353Here is the configuration for this listener: