I have a scheduled job which is running exactly 6 min. is there any option to increase time limit

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.

1 Like

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)