Cronbox

Command line inbox and timecard for scheduled job status and output.

Run any scheduled command through Cronbox to store its exit status and output for later review and diagnostics. Data is stored as simple JSON in the default location of $HOME/.cronbox

| Cronbox |                                                  *=Output
=====================================================================
| ID | COMMAND                              | EXIT |           WHEN |
=====================================================================
|  1 | /usr/local/bin/task sync             |    0 | 12 minutes ago |
---------------------------------------------------------------------
|  2 | ~/Dropbox/bin/run-daily-backup       |   *0 | 20 minutes ago |
---------------------------------------------------------------------

Installation

$ gem install cronbox

Usage

For complete usage options, please consult cb --help

$ cb                  # Query cronbox index timecard
$ cb CMD [ARGS]       # Run and record output of command
$ cb -o ID            # Review full-output of entry

CRONTAB USAGE WITH RVM

If you're using RVM to manage Ruby, Cronbox may not be available to crontab due to missing paths. Try adding the following two options to the top of your file:

SHELL=/bin/bash
BASH_ENV=$HOME/.profile
* * * * * cb true          # Cronbox testing
  • Depending on your OS/Environment you might require .bash_profile instead.
  • The cb true test line should show up on your Cronbox timecard.
    • Once it does you'll know you have everything working correctly and can remove it.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/binarybabel/cronbox.

  • After checking out the repo, run bin/setup to install dependencies.
  • Then, run rake test to run the tests.

Author & License

                                                                             0101010            
                                                                          0010011               
                                                                        110101                  
                                                                      0011                      
         __   __   __        __   __                                           0100010          
        /  ` |__) /  \ |\ | |__) /  \ \_/                         1010    0010101000001         
        \__, |  \ \__/ | \| |__) \__/ / \                       010101110100111101010010        
                                                               01     0011000100                
            A BinaryBabel OSS Project                                                           
                                                                 0100                           
                                                              01001001    binarybabel.org       
                                                             0100111001    000001010001110      
                                                            101       0010010000010100100101    
                                                        00111          0010011110100011001010   
                                                        0110            10000010100111001000100 

The gem is available as open source under the terms of the MIT License.