Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simultaneous Runs

Status
Not open for further replies.

EvansEd

Programmer
Sep 30, 2002
9
US
I am sort of new to UNIX and don't know much of the commands, there I have this question to ask of you guys.

I have a unix script that is on a schedule to run every friday at 5pm, and to also run on last day of month at 5pm. There will be cases when the two criterias above are true, therefore causing the same job to run simultaneously. Are there any UNIX statements that would avoid this situation from occuring?

Thanks much for your help!
 
The easy way would be to duplicate the script and put a test in the end of month something like:
if `date +%a` = "Fri" then
exit
else do something
fi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top