Rushabh Mehta | 3966f1d | 2012-02-23 12:35:32 +0530 | [diff] [blame] | 1 | # ERPNext - web based ERP (http://erpnext.com) |
| 2 | # Copyright (C) 2012 Web Notes Technologies Pvt Ltd |
| 3 | # |
| 4 | # This program is free software: you can redistribute it and/or modify |
| 5 | # it under the terms of the GNU General Public License as published by |
| 6 | # the Free Software Foundation, either version 3 of the License, or |
| 7 | # (at your option) any later version. |
| 8 | # |
| 9 | # This program is distributed in the hope that it will be useful, |
| 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | # GNU General Public License for more details. |
| 13 | # |
| 14 | # You should have received a copy of the GNU General Public License |
| 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | |
Rushabh Mehta | 1a35574 | 2012-02-23 11:46:28 +0530 | [diff] [blame] | 17 | """will be called by scheduler""" |
| 18 | |
| 19 | import webnotes |
Anand Doshi | f9e4b16 | 2012-02-28 11:31:46 +0530 | [diff] [blame] | 20 | from webnotes.utils import scheduler |
Rushabh Mehta | 1a35574 | 2012-02-23 11:46:28 +0530 | [diff] [blame] | 21 | |
| 22 | def execute_all(): |
Anand Doshi | f9e4b16 | 2012-02-28 11:31:46 +0530 | [diff] [blame] | 23 | """ |
| 24 | * get support email |
| 25 | * recurring invoice |
| 26 | """ |
| 27 | try: |
| 28 | from support.doctype.support_ticket import get_support_mails |
| 29 | get_support_mails() |
| 30 | except Exception, e: |
| 31 | scheduler.log('get_support_mails') |
| 32 | |
| 33 | try: |
| 34 | from accounts.doctype.gl_control.gl_control import manage_recurring_invoices |
| 35 | manage_recurring_invoices() |
| 36 | except Exception, e: |
| 37 | scheduler.log('manage_recurring_invoices') |
| 38 | |
| 39 | |
Rushabh Mehta | 1a35574 | 2012-02-23 11:46:28 +0530 | [diff] [blame] | 40 | |
| 41 | def execute_daily(): |
| 42 | """email digest""" |
Anand Doshi | f9e4b16 | 2012-02-28 11:31:46 +0530 | [diff] [blame] | 43 | try: |
| 44 | from setup.doctype.email_digest.email_digest import send |
| 45 | send() |
| 46 | except Exception, e: |
| 47 | scheduler.log('email_digest.send') |
| 48 | |
| 49 | def execute_weekly(): |
| 50 | pass |
| 51 | |
| 52 | def execute_monthly(): |
| 53 | pass |
| 54 | |
| 55 | def execute_hourly(): |
| 56 | pass |