Hi there,
Is there a way to manipulate or reduce the timing of frappe.email.queue.flush execution?
I have set 2FA while logging in, but it takes around 5 to 8 minutes for the users to receive mail, which is the reason.
NCP
January 29, 2024, 5:05am
2
Hi @Pradeep11 ,
You should check the post.
You are correct: this cannot be changed from the front end. It can only be changed on the backend.
The schedule is defined in the “hooks.py” file for Frappe Framework (link here )
[image]
The function 'frappe.email.queue.flush' processes all the emails in the Email Queue.
The “all” schedule is configured via a JSON file. But by default, it’s every 4-5 minutes. (very confusing name for a schedule)
So. Let’s say we want our emails processed every 2 minutes instead? You could delete that l…
Another reference post.
Hi @Prasath_Sekar :
This behavior is editable on your hooks.py file.
scheduler_events = {
"cron": {
"0/15 * * * *": [
"frappe.oauth.delete_oauth2_data",
"frappe.website.doctype.web_page.web_page.check_publish_status",
"frappe.twofactor.delete_all_barcodes_for_users",
],
"0/10 * * * *": [
"frappe.email.doctype.email_account.email_account.pull",
],
},
"all": [
"frappe.email.queue.flush",
Hope this helps.
I hope this helps.
Thank You!