blob: 179586ffac839e68dc6a1257849a43927a9b8528 [file] [log] [blame]
Rushabh Mehta3966f1d2012-02-23 12:35:32 +05301# 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
Anand Doshi486f9df2012-07-19 13:40:31 +053017from __future__ import unicode_literals
Rushabh Mehta1a355742012-02-23 11:46:28 +053018"""will be called by scheduler"""
19
20import webnotes
Anand Doshif9e4b162012-02-28 11:31:46 +053021from webnotes.utils import scheduler
Rushabh Mehta1a355742012-02-23 11:46:28 +053022
23def execute_all():
Anand Doshif9e4b162012-02-28 11:31:46 +053024 """
25 * get support email
26 * recurring invoice
27 """
28 try:
29 from support.doctype.support_ticket import get_support_mails
30 get_support_mails()
31 except Exception, e:
32 scheduler.log('get_support_mails')
33
34 try:
35 from accounts.doctype.gl_control.gl_control import manage_recurring_invoices
36 manage_recurring_invoices()
37 except Exception, e:
38 scheduler.log('manage_recurring_invoices')
39
40
Rushabh Mehta1a355742012-02-23 11:46:28 +053041
42def execute_daily():
43 """email digest"""
Anand Doshif9e4b162012-02-28 11:31:46 +053044 try:
45 from setup.doctype.email_digest.email_digest import send
46 send()
47 except Exception, e:
48 scheduler.log('email_digest.send')
49
50def execute_weekly():
51 pass
52
53def execute_monthly():
54 pass
55
56def execute_hourly():
57 pass