Every bash process writes to stdout the "normal" messages (infos, debug msg.., etc) and errors messages to stderr. This behavior allow parent processes to make choices.
We can see the "exit code" as another kind of interprocess comunication, but some softwares as "cronic" look at the stderr messages to see if subprocess had problems. A subprocess can reach the target, but if its important warnings go to stderr cronic bring them to the user attection.
What it cronic"? "Cronic is a small shim shell script for wrapping cron jobs so that cron only sends email when an error has occurred. Cronic defines an error as any non-trace error output or a non-zero result code."
I'm using it very extensively, but with rclone it fails because rclone writes everything to stderr. So, for example, in the following message there is no warning and no errors, but it is entirely written in the stderr:
Cronic detected failure or error output for the command:
RESULT CODE: 0
Transferred: 6.212 MBytes (103.967 kBytes/s)
Elapsed time: 1m1.1s
2017/03/16 13:21:41 Local file system at /var/server/repository/public/R&D - Controllers: Waiting for checks to finish
2017/03/16 13:21:41 Local file system at /var/server/repository/public/R&D - Controllers: Waiting for transfers to finish
2017/03/16 13:21:41 Waiting for deletions to finish
Transferred: 8.607 MBytes (88.126 kBytes/s)
Elapsed time: 1m40s
Obviously I can redirect everything to stdout, but I can also redirect to /dev/null ... in my case it is the same: I'm losing the "real" errors! Network problems, privilege problems, or others. So it can run for months without let me understand that it is not working. Note that my servers could have dozen of crontab jobs; cronic allow me to survive
Thanks for your attention! I'm using rclone since one week ago and it seems to me very interesting