Closed chrisvaughn closed 6 years ago
for testing I did the following:
basic test case
>> ./crony-runner.py echo "hello"
2017-12-03T08:34:47 INFO: No config file found.
2017-12-03T08:34:47 INFO: hello
error case
>> ./crony-runner.py cat /filethatdoesntexist
2017-12-03T08:35:43 INFO: No config file found.
2017-12-03T08:35:43 INFO: cat: /filethatdoesntexist: No such file or directory
2017-12-03T08:35:43 ERROR: Error running command! Exit status: 1, cat: /filethatdoesntexist: No such file or directory
>> echo $?
1
case for output while command is running
runloop.sh
for number in {1..10}; do echo "$number "; sleep 1; done
>> ./crony-runner.py bash runloop.sh
2017-12-03T08:38:23 INFO: No config file found.
2017-12-03T08:38:23 INFO: 1
2017-12-03T08:38:24 INFO: 2
2017-12-03T08:38:25 INFO: 3
2017-12-03T08:38:26 INFO: 4
2017-12-03T08:38:27 INFO: 5
2017-12-03T08:38:28 INFO: 6
2017-12-03T08:38:29 INFO: 7
2017-12-03T08:38:30 INFO: 8
2017-12-03T08:38:31 INFO: 9
2017-12-03T08:38:32 INFO: 10
>> echo $?
0
Fixes #9
👀 💯 👍
next time if you add "Fixes #9" in the commit message when it's merged I believe it auto closes the open issue.