I have a scheduled job which is running everyday for 6 min. is there any option to set/increase the time limit of the scheduled jobs
Yes, you can set or increase the time limit for scheduled jobs in Frappe by adjusting the queue timeouts in your siteâs configuration.
You can add custom queues and set their timeout in your common site configs.
Yes ,
using
frappe.enqueue(
âyour_app.your_module.your_functionâ,
queue=âlongâ,
timeout=900, # 900 seconds = 15 minutes
job_name=âdaily_long_jobâ
)
or
I have scheduled the job using hooks.py like this
the function just executes the logic and i am not using queue or batch processing. just filtering all the records and processing each record sequentially and the no. of records can be more than 2000.
everyday the job is running exactly 6 min.
so how can i increase the job time or should i need to use queue and set the time while adding in queue
You could start the long-running job in the scheduler event and set a custom timeout (optionally):
def my_event_job():
frappe.enqueue(method=my_long_running_tags, queue="long")
Instead of making the scheduler wait 6 minutes, we can send the job to a worker to run in the background.
You can do â enqueue(âyour_app.tasks.long_jobâ, queue=âlongâ, timeout=6000)

