Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/riywo/proctask
A simple task definition and runner
https://github.com/riywo/proctask
Last synced: 3 months ago
JSON representation
A simple task definition and runner
- Host: GitHub
- URL: https://github.com/riywo/proctask
- Owner: riywo
- Created: 2013-08-14T09:26:02.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-08-19T06:47:52.000Z (over 11 years ago)
- Last Synced: 2024-04-14T15:22:49.311Z (9 months ago)
- Language: Go
- Homepage:
- Size: 121 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# proctask
A simple task definition and runner
## What is proctask?
You can determine a task using `run`, `env`, `stdin` files and get outputs as `stdout`, `stderr`. `proctask` uses user's login shell, so you can use your own profile, like `rbenv`.
## Usage
Locate `run` in a working directory. Write `env` and `stdin` in the same directory if you need.
$ ls /path/to/dir
env run stdinRun `proctask`. If you omit command line arg, `proctask` runs in your current directory.
$ proctask /path/to/dirThen, you can see `stdout` and `stderr` of the command.
$ ls /path/to/dir
env run stderr stdin stdout## Example
$ cat env
FOO=foo$ cat stdin
aaa$ cat run
#!/usr/bin/env ruby
p gets
p ENV["FOO"]
STDERR.puts "Hi!"$ proctask
2013/08/18 23:01:39 INFO load env path: /tmp/work/env
2013/08/18 23:01:40 INFO run cmd: [/bin/bash -l -c /tmp/work/run], env: [FOO=foo USER=riywo HOME=/Users/riywo], dir: /tmp/work
hi!
2013/08/18 23:01:41 INFO Command succeeded!$ cat stdout
"aaa\n"
"foo"$ cat stderr
Hi!## TODO
- stdout rotate
- stdout size limit
- stderr timestamp
- exit code inheritance
- test## License
MIT
## Author
Ryosuke IWANAGA a.k.a. riywo