Simple tool to execute commands on schedule. Designed for maintain web applications.
Installation
$ gem install command_timer
Usage
$ cmdtimer [options] COMMANDS_CONFIG_FILE
Options
-c, --count-down | Assign the seconds to count down. (default 30s) |
-s, --ntp-server | Assign the NTP server. (only ntp installed) |
Config File Sample (YAML)
command1:
description: "stop unicorn"
burn_time: "14:00:00"
content: |
cd /path/to/app/
cap unicorn:stop
command2:
description: "deploy"
burn_time:
content: |
cd /path/to/app/
cap deploy
observer: |
cd /path/to/app/
cap invoke COMMAND="tail -f /path/to/log/file"
command3:
description: "start unicorn"
burn_time: "16:00:00"
content: |
cd /path/to/app/
cap unicorn:start
burn_time
HH:mm:ss | execute commands on time |
blank | execute commands by user input |
auto | execute commands after previous command ended。 |
from https://github.com/cctiger36/command_timer