Deleting old cron jobs

Hello community,

I was learning how cron jobs work in ERPNext but found some errors. I want that when any cron job is set and generated by default after every min then the old job will be default deleted from the system. This means in that doctype according to specific field the old job must be deleted when new is created.

If anyone had tried or has any idea then please answer it.
Thanks in advance

Okay, first of all, ‘cron’ is a linux function. It is not particularly part of Frappe/ERPNext and therefore it will not of itself understand doctypes.

So, you should likely write bash script that performs the self deletion process for you and is triggered by a single cron entry in the crontab.

Are you possibly referring to the scheduler function in ERPNext instead of cron?