The main inspiration for this command was frustration. Often I'd start a long dofile and move on, only for it to crash after 5 lines because of some stupid coding mistake. Likewise, I've lost many computer-hours due to network issues causing the server to lose access to the dofile and just stopping dead in its tracks. This, and many other problems can be fixed by using this command.

As you might have guessed, cdo is an alternative to do. So instead of do greatDofile.do, you can now cdo greatDofile.do . Why would you do that?
  1. If you specify a valid sendtoslack URL, you will get smartphone updates when the dofile crashes or finishes.*
  2. Stata will run a copy of your dofile instead of the original, ensuring you can always make updates to the dofile while its running and that network issues don't mess you up when working on an external server.
  3. You can ask Stata to run a program upon crash/finish, for example to log out of the pay-per-minute server or inform you through some alternative means than sendtoslack.
  4. Automatically generate logfiles, optionally with a timestamp in the name.
  5. Any and all options can be saved, so that they become the default.
Examples on how to do all that are in the help file. You can download this command through ssc using ssc install cdo.

Let me know if you encounter any bugs or would appreciate certain additional functionality.

* Setting up sendtoslack is easy, taking less than 5 minutes.