Changes between Version 13 and Version 14 of DailyReminderScriptForTracScript
- Timestamp:
- Mar 1, 2022, 7:28:36 AM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DailyReminderScriptForTracScript
v13 v14 9 9 The script searches the ticket status, and if one's status is not closed, it collects by owner and sends each of them a html mail. 10 10 11 This is a Python script. The underlying database connection relies on Python's d b capabilities, so probably you will have to install the appropriate dbconnector module(s) for your database:11 This is a Python script. The underlying database connection relies on Python's database capabilities, so probably you will have to install the appropriate database connector module(s) for your database: 12 12 * MySQL: mysql-python 13 13 * PostgreSQL: psycopg2 … … 19 19 Feel free to adopt it to your needs, please test it, use it! 20 20 21 '''Note:''' Change line 103 when upgrading from Trac 11.x to Trac12.x due to database changes:21 '''Note:''' Change line 103 when upgrading from Trac 0.11.x to Trac 0.12.x due to database changes: 22 22 {{{#!python 23 detail = detail + " created at " + str(time.strftime('%Y. %B %d. (%A) %H:%M:%S', time.gmtime(int(tkt[0]/1000000))))23 detail = detail + " created at " + str(time.strftime('%Y. %B %d. (%A) %H:%M:%S', time.gmtime(int(tkt[0]/1000000)))) 24 24 }}} 25 25 26 Please note the indentation! The Trac 12.x database converts every timestamp to a more accurate timestamp format, so a timestamp field must be divided by a million to work properly. 26 Please note the indentation! The Trac 0.12.x database converts every timestamp to a more accurate timestamp format, so a timestamp field must be divided by a million to work properly. 27 28 === Example 29 30 One should put in a cronjob '''/etc/cron.d/trac_remind.cron''': 31 {{{#!sh 32 0 0 * * mon-fri root /path/to/this/script/trac_reminder_report.py 33 }}} 34 35 Don't forget to put a `MAILTO=your.address@your.domain.tld` into the cron file, the script prints out the recipient names where the mails had been sent to. 27 36 28 37 == Bugs/Feature Requests … … 44 53 You can check out DailyReminderScriptForTracScript from [/svn/dailyreminderscriptfortracscript here] using Subversion, or [source:dailyreminderscriptfortracscript browse the source] with Trac. 45 54 46 == Example55 == Installation 47 56 48 One should put in a cronjob '''/etc/cron.d/trac_remind.cron''': 49 {{{#!sh 50 0 0 * * mon-fri root /path/to/this/script/trac_reminder_report.py 51 }}} 52 53 Don't forget to put a `MAILTO=your.address@your.domain.tld` into the cron file, the script prints out the recipient names where the mails had been sent to. 57 General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page. 54 58 55 59 == Recent Changes