def trigger_emails():
 settings = frappe.get_doc(u'Daily Work Summary Settings')
 for d in settings.companies:
  if (frappe.utils.nowtime().split(u':')[0] == d.send_emails_at.split(u':')[0]):
   emails = get_employee_emails(d.company)
   if emails:
    daily_work_summary = frappe.get_doc(dict(doctype=u'Daily Work Summary', company=d.company)).insert()
    daily_work_summary.send_mails(settings, emails)

def trigger_emails ( ) : settings = frappe . get_doc ( u'Daily Work Summary Settings' ) for d in settings . companies : if ( frappe . utils . nowtime ( ) . split ( u':' ) [ 0 ] == d . send_emails_at . split ( u':' ) [ 0 ] ) : emails = get_employee_emails ( d . company ) if emails : daily_work_summary = frappe . get_doc ( dict ( doctype = u'Daily Work Summary' , company = d . company ) ) . insert ( ) daily_work_summary . send_mails ( settings , emails )
send emails to employees of the enabled companies at the give hour asking them what did they work on today .