If you don’t really know how to code, make “until” balls or that kind of thing, here’s an application that will allow you to work around the problem if you do a little systems.
This application is “Retry” which, once installed on Linux, will allow you to place an order again until it passes successfully.
To work, Retry captures the stdin in memory as data is passed to the command, and this captured stdin is then replayed if the command is repeated. This allows repetition to be built into shell pipelines. Retry also captures the stdout in memory, and if the command was successful, the stdout is marked as normal. On the contrary, if the command was repeated, the stdout is changed to stderr.
This ensures that the output is passed to stdout once and only once.
To install Retry on Ubuntu / Debian:
sudo add-apt-repository ppa:minfrin/retry sudo apt-get update sudo apt-get install retry
Thus, Retry allows in your scripts or CRON calls to play the repetition until a different result (success or error).
In short, it can be useful in some cases.