How to debug runing as scheduler job

like in the top, how to debug runing as scheduler job

Hi @Maciej_Miskiewicz,

If you haven’t checked then check it documentation

Thank You!

Yes, I read, but the breakpoint does not stop at Job… debuger stop in breakpoint only when i have interaction in web site…
i also tried pdb.set_trace() and job stop but i dont have posibility to check anything :frowning:
i also look posibility to add details like result of executed method in job… maybe you know something?
how to add result method to doctype “scheduler job log”

i make something like this

 last_log = frappe.db.get_value("Scheduled Job Log", {"status":"Start"}, "name", order_by="creation desc")

    if last_log and frappe.get_doc("Scheduled Job Log", last_log).status == "Start":
        frappe.get_doc({
            "doctype": "Comment",
            "comment_type": "Info",
            "reference_doctype": "Scheduled Job Log",
            "reference_name": last_log,
            "content": f"{last_log} test momment"
        }).insert(ignore_permissions=True)```

someone knows a better way to get the id for the task