I have too many entry in cron tab to run script at every half hour (more than 50 script).

At every half hour all script will executed simultaneously so that server load will increase due to starting of more than 50 process at a time.

To overcome I have set crontab that will execute one shell script and in this shell script all script will be executed one by one.

for example allscript.sh will executed from crontab



But in one by one execution if one script take too many time (5 minute) then other script have to wait for specific time. So I want to set in this script if any process take more than one minute then automatically other script's execution will start.

  • this is bordering on a scheduling tool. do all files must be run in order ? can some be run in parallel ?
    – Archemar
    Nov 10, 2017 at 12:24

1 Answer 1


Use a job queue. Likely what you'll do is setup a job queue with one thread per core. This allows all your jobs to queue in one operation + if one job takes longer than others, then the others will be running in other threads.

There are many ways to accomplish this.

Here are a few searches which my help you.

ubuntu job queue

bash job queue

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.