Notification: Send Alert On Days before/After is not working

I am trying to send ‘System notification’ which works fine on ‘SAVE’ but it does not work with ‘ Days Before / After ’ .

I am using below frappe versions
ERPNext: v13.0.1 (version-13)
Frappe Framework: v13.0.2 (version-13)

Can anyone please let me know how to solve this issue ?

Hello, did you find the solution? Any help will be greatly appreciated.

@s_Mafutta I left this thing for a while. But I found that Days Before / After was working when I set larger date then today.

When I posted this question, I was trying with current date and expecting notification on same day by setting zero in days field. so it was not working.

By larger date you mean the reference date has to be another date different from today? Because i have tried that and still no notification. if i am not mistaken the code computing is in frappe/email/doctype/notification/

from the code you can see that after adding the number of days to today’s date the date has to be between reference_date_start & reference_date_end

def get_documents_for_today(self):
		'''get list of documents that will be triggered today'''
		docs = []

		diff_days = self.days_in_advance
		if self.event=="Days After":
			diff_days = -diff_days

		reference_date = add_to_date(nowdate(), days=diff_days)
		reference_date_start = reference_date + ' 00:00:00.000000'
		reference_date_end = reference_date + ' 23:59:59.000000'

		doc_list = frappe.get_all(self.document_type,
				{ self.date_changed: ('>=', reference_date_start) },
				{ self.date_changed: ('<=', reference_date_end) }

		for d in doc_list:
			doc = frappe.get_doc(self.document_type,

			if self.condition and not frappe.safe_eval(self.condition, None, get_context(doc)):


		return docs