Can you please explain which scheduled event you want to running this function. You monkey patch is absolutely correct. We have also written lots of monkey patches for clients but all monkey patches are running correctly in local server even also on a frappe cloud server.
When a I save the doc the monkey patch functions is called => Ok.
Second one:
Scheduled Event
Hourly
Code: the same as above.
When the second one is executed than here is this error in Scheduled Job Log:
Traceback (most recent call last):
File “apps/frappe/frappe/core/doctype/scheduled_job_type/scheduled_job_type.py”, line 97, in execute
frappe.get_doc(“Server Script”, script_name).execute_scheduled_method()
File “apps/frappe/frappe/core/doctype/server_script/server_script.py”, line 117, in execute_scheduled_method
safe_exec(self.script)
File “apps/frappe/frappe/utils/safe_exec.py”, line 85, in safe_exec
exec(
File “”, line 22, in
File “apps/frappe/frappe/integrations/utils.py”, line 49, in make_delete_request
return make_request(“DELETE”, url, **kwargs)
TypeError: make_request() got an unexpected keyword argument ‘response_body’
Here I can find that the original path is used (apps/frappe/frappe/integrations/utils.py).
Maybe this is the issue of combinations: frappe cloud, server script and scheduled event.