My system is configured as follows:
- database server on a linux server
- web application on another linux server
For sanitation purposes I would like to restart these servers during night at least once a week.
The constraints are :
- when the web application is loaded the database must be already online
- the downtime should be as small as possible
- don't want to rely on time synchronization between the servers
Can you suggest a simple and clean way to achieve this ?
I suppose I have to create a cron job but besides issuing a server shutdown I don't know how to wait the launch of the web application till the database is online again.