Mutitenancy scheduler for all sites

Hello All,
I have to run a method (scheduler) for a particular site . I have added method in custom doctype and called from erpnext hooks.py
I am validation the particular event in trigger method of scheduler.py
modified trigger method is “trigger · GitHub

when I run the scheduler, it runs for default site only. How can i enable it for all sites?

Regards,
Gangadhar kadam

Hello All,
To solve the issue , I have added new command in cli.py
I am calling above function from cronjob
I tried to connect to another site using default frappe.connect(site=‘stitch7’) method but it was giving password error so i used external mysql conn method.
After connecting to another site from mysql connection , I was getting error for sendmail function so i have reconnected to default frappe site using frappe.connect(site=‘demo’)
The change is working.

This is all for deployment server (live site).

Is above approach is correct to implement above change? Please suggest.

Regards,
Gangadhar kadam

Please find my code on “frapp.cli · GitHub

Thank You,
Gangadhar kadam

Please consider buying developer support (Not Found) for multi-tenancy support.