Setting up weekly notification for Overdue Invoices

Hello, I am trying to setup a weekly email to customers for Overdue Invoices by Notifications doctype.

In the “Send Alert on” I have set the property to “Custom” and in the condition I have put the condition

doc.doctype == “Sales Invoice” and doc.status == “Overdue” and date_diff(nowdate(), doc.due_date, ‘days’) >= 7 and getdate(doc.modified).strftime(“%A”) == “Monday” and doc.outstanding_amount > 500

Can anyone verify what is wrong in this condition as the system is not triggering the emails.

Any help on this, or any other workaround ?