Email Alert due date not notifying

Hi, we have a problem regarding due date on email alert. We have set a date that before the due date ERP will alarm us 1 day before its due date. We have tried it and the date has been reached still no alerts has been emailed.

Please refer to the following pictures:


Can you check your Scheduler Log for any errors

@rmehta, Here’s the not seen error.

Method: daily, Handler: frappe.email.doctype.email_alert.email_alert.trigger_daily_alerts
Traceback (innermost last):
File “/home/frappe/press/benches/1605021224/apps/frappe/frappe/tasks.py”, line 114, in scheduler_task
frappe.get_attr(handler)()
File “/home/frappe/press/benches/1605021224/apps/frappe/frappe/email/doctype/email_alert/email_alert.py”, line 34, in trigger_daily_alerts
trigger_email_alerts(None, “daily”)
File “/home/frappe/press/benches/1605021224/apps/frappe/frappe/email/doctype/email_alert/email_alert.py”, line 55, in trigger_email_alerts
(nowdate(), diff_days or 0)):
File “/home/frappe/press/benches/1605021224/apps/frappe/frappe/database.py”, line 193, in sql_list
return [r[0] for r in self.sql(query, values, debug=debug)]
File “/home/frappe/press/benches/1605021224/apps/frappe/frappe/database.py”, line 136, in sql
self._cursor.execute(query, values)
File “/home/frappe/press/benches/1605021224/env/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/frappe/press/benches/1605021224/env/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
ProgrammingError: (1064, “You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘return) = ADDDATE(DATE(‘2016-05-04’), INTERVAL 1 DAY)’ at line 2”)

I noticed that Stock Request is a custom Doctype, the “Reference date” you’ve set (date_required) what is the “Type” for that field?

@vjFaLk, Yes it’s a custom Doctype. It’s a date type of field.

@vjFaLk, Is it not because I didn’t put any value at the “condition” field?

No, that’s not an issue. I’ll have to try to recreate this and get back to you. Are your other Email Alerts working fine?

@vjFaLk, Yes only those date email alerts are not working.

@vjFaLk, Just want to ask. Is the email alert going to work?

Oh sorry for not notifying you ASAP, we’ve made a fix but it’s not live yet. I’ll let you know, when it’s live.

1 Like

@vjFaLk, Thanks!!

@vjFaLk, Any update? :smiley:

Does this work with Custom field in any Doctype, Other alerts seems to work, but Send Alert On Days Before doesn’t seems to, any update or modifications in condition

Hello Guys

This is another most sort out request as regards notification even after Four years.
just as @punabx mentioned. Can this work with Custom date field in any Doctype as shown below

I tried using the above snapshot but gat no email nor was it on email queue.

Regards