Hi Experts,
I need a script advice to schedule 12 jobs ( SAS Codes execute back ground ).
Algorithem:
Request you to please assist.
Simple thing would be,
At the start of the process, check whether a lock file is there, else create the lock file. Do the process A. At the end delete the lock file.
Do the same for process B, check whether a lock file exist, if it is there, dont start process B, else start and do as similar as step 1.
man wait
DESCRIPTION If no argument is specified, wait waits until all processes (started with &) of the current shell have completed, and reports on abnormal terminations. If a numeric argument pid is given and is the process
could help you I think.
Try the wait function described in the script 11-24 on this page:
Advanced Bash Shell Scripting Guide - Job Control Commands