My target is to run about 10 scripts thru cron , but those scripts can not be run at the same time, so before every script run I am doing check to make sure that non of them are running. What I did - I created flag.txt file which every script could access and in case some of the scripts are running - script leaving flag '1', when it finished the job it leaving flag '0'. So if another script is trying execute during first script is running - it just stop working, but my problem is -- Let say cron run 1st script at 10:00 , another script should start at 10:15, how I can delay the start of the another script if at 10:15 the first script is still running ? in my script I am just using if (check the flag) {run script if flag OK}
Have one big script running as cron job , in turn that big scripts will start your scripts one by one .