def send_daily():
 now = frappe.utils.now_datetime()
 for report in frappe.get_all(u'Auto Email Report', {u'enabled': 1, u'frequency': (u'in', (u'Daily', u'Weekly'))}):
  auto_email_report = frappe.get_doc(u'Auto Email Report', report.name)
  if (auto_email_report.frequency == u'Weekly'):
   if (now.weekday() != {u'Monday': 0, u'Tuesday': 1, u'Wednesday': 2, u'Thursday': 3, u'Friday': 4, u'Saturday': 5, u'Sunday': 6}[auto_email_report.day_of_week]):
    continue
  auto_email_report.send()

def send_daily ( ) : now = frappe . utils . now_datetime ( ) for report in frappe . get_all ( u'Auto Email Report' , { u'enabled' : 1 , u'frequency' : ( u'in' , ( u'Daily' , u'Weekly' ) ) } ) : auto_email_report = frappe . get_doc ( u'Auto Email Report' , report . name ) if ( auto_email_report . frequency == u'Weekly' ) : if ( now . weekday ( ) != { u'Monday' : 0 , u'Tuesday' : 1 , u'Wednesday' : 2 , u'Thursday' : 3 , u'Friday' : 4 , u'Saturday' : 5 , u'Sunday' : 6 } [ auto_email_report . day_of_week ] ) : continue auto_email_report . send ( )
check reports to be sent daily .