How To Create Master Batch File To Call Other Batch Files On Success Only

I stop server services prior to the server backups.  Then the backup runs.  Then the server services are restarted.  This is all done through three separate batch files scheduled in Task Scheduler.
I need help in creating a master batch file that calls one batch file, then on success call another batch file that restarts server services.  If the first batch file fails to complete, I need some sort of alert of failure.  Is there way to set it so that second batch starts regardless?  Since these are server services I need them up and running for the business day.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
@echo off
call FirstBatchChecker && call FirstBatchStarter || (echo %date% %time% - FirstBatch did not succeed >> logFile.Log)
call SecondBatchChecker 
REM etc.

Open in new window

should do exactly that. Make sure that FirstBatchStarter does exit without errorcode - if unsure, use an explicit     exit /b 0    as last command.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gbautista34Author Commented:
Do I use the errorlevel within the first batch file or in this example file above?  
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
Sorry, I should have explained that, but thought it is obvious.
   A && B || C
executes A, and if it returns 0 (no error), B. If the errorlevel is different from zero, C runs instead of B.
So your batch file A should just return a zero if ok, and something else otherwise.
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

gbautista34Author Commented:
I will give this a try and see what happens.  Thank you very much.
James MurrellProduct SpecialistCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
gbautista34Author Commented:
The solution has been partially tested and seems like it will help when fully deployed,.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.