Run Multiple background job at time

Hello dear,
I have a screcpt tha’s set background job. and background job running serally. it’s fine.
but script set I need to run multiple background jot at time that’s queeued in worker.

I have 8 core.
this is my common_site_config.json

{
 "background_workers": 6,
 "dns_multitenant": true,
 "file_watcher_port": 6787,
 "frappe_user": "mainul",
 "gunicorn_workers": 2,
 "live_reload": true,
 "maintenance_mode": 0,
 "pause_scheduler": 0,
 "rebase_on_pull": false,
 "redis_cache": "redis://localhost:13000",
 "redis_queue": "redis://localhost:11000",
 "redis_socketio": "redis://localhost:12000",
 "restart_supervisor_on_update": true,
 "restart_systemd_on_update": false,
 "serve_default_site": true,
 "shallow_clone": false,
 "socketio_port": 9000,
 "use_redis_auth": false,
 "webserver_port": 8000
}

Worker list.

zit_portal-workers:zit_portal-frappe-schedule: started
zit_portal-workers:zit_portal-frappe-default-worker-0: started
zit_portal-workers:zit_portal-frappe-default-worker-1: started
zit_portal-workers:zit_portal-frappe-default-worker-2: started
zit_portal-workers:zit_portal-frappe-default-worker-3: started
zit_portal-workers:zit_portal-frappe-default-worker-4: started
zit_portal-workers:zit_portal-frappe-default-worker-5: started
zit_portal-workers:zit_portal-frappe-short-worker-0: started
zit_portal-workers:zit_portal-frappe-short-worker-1: started
zit_portal-workers:zit_portal-frappe-short-worker-2: started
zit_portal-workers:zit_portal-frappe-short-worker-3: started
zit_portal-workers:zit_portal-frappe-short-worker-4: started
zit_portal-workers:zit_portal-frappe-short-worker-5: started
zit_portal-workers:zit_portal-frappe-long-worker-0: started
zit_portal-workers:zit_portal-frappe-long-worker-1: started
zit_portal-workers:zit_portal-frappe-long-worker-2: started
zit_portal-workers:zit_portal-frappe-long-worker-3: started
zit_portal-workers:zit_portal-frappe-long-worker-4: started
zit_portal-workers:zit_portal-frappe-long-worker-5: started
zit_portal-web:zit_portal-frappe-web: started
zit_portal-web:zit_portal-node-socketio: started
zit_portal-web:zit_portal-job-watcher: started

I have 6 worker.
but when my sript within 5 minutes making almost 1000 job, but it’s stats 1 by 1 it’s taking too time. I need to run 6 job at a time. means each worker should be run 1 at a time.

Thanks.

1 Like