When you deploy a microservice, it need to be aware about readiness of the other microservice or backing services. To do that you can execute Try Script with your own desired argument value to check if the service is ready or not. There are some examples in the following.
Download try.sh file to your computer and grant execution privilage to it as the following command.
sudo chmod +x try.shNow Try Script is ready for execution. you can set parameters via environment variables as the following command:
export TRY_INTERVAL=10
export TRY_NUMBER= 12
export TRY_COMMAND=<Your Command>or via passing arguments as the following options
- -i : Specifiy interval in seconds
 - -n : Specify number of retring to executing your command
 - -v : Enable verbose mode to show more information during the proccess
 
./try.sh -i 5 -n 10 <Your Command>
./try -i 5 <Your Command>
./try -i 10 -v <Your Command>If you are interested in this project you can help to make it better. Feel free to fork this repository and make changes and send pull request. I will check your commits and merge it to the main branch if it was interesting feature.