Package: watchmen-rust
Watchmen (0.0.1)Watchmen is a daemon process manager that for you manage and keep your application online 24/7中文简体|EnglishInstallBuild from source# Clone the repositorygitclonehttps://github.com/ahriroot/watchmen.git# Go into the repositorycdwatchmen# Install watchmen daemoncargoinstall--pathwatchmend# Install cli toolcargoinstall--pathwatchmenInstall from crates.io# Install watchmen daemoncargoinstallwatchmend# Install cli toolcargoinstallwatchmenGetting StartedGenerate config file"" Default is ${HOME}/.watchmen/config.tomlwatchmen -g ""[watchmen]# The engine to use for the watchmen server# Valid values are "sock", "socket", "http", "redis"# sock: Unix socket# socket: TCP socket# http: HTTP Api (Include Web panel)# redis: Redis pub/subengines=["sock"]# The default engine to use for connecting to the watchmen serverengine="sock"# The log directory of the watchmen serverlog_dir="$HOME/.watchmen/logs"# The log level of the watchmen server# Valid values are "debug", "info", "warn", "error". Default is "info"log_level="info"# The standard output of the watchmen server# Default is Nonestdout="$HOME/.watchmen/watchmen.stdout.log"# The standard error of the watchmen server# Default is Nonestderr="$HOME/.watchmen/watchmen.stderr.log"# The pid file of the watchmen server# Default is `$HOME/.watchmen/watchmen.pid`pid="$HOME/.watchmen/watchmen.pid"# The task config file name matching pattern# Default is `^.*\\.(toml|ini|json)$`mat="^.*\\.(toml|ini|json)$"# Tasks cache file, json formatcache="$HOME/.watchmen/cache.json"[sock]# The unix socket path of the watchmen serverpath="/tmp/watchmen.sock"[socket]host="127.0.0.1"port=1949[http]host="127.0.0.1"port=1997[redis]host="localhost"port=6379username=""password=""queue_index=0queue_name="watchmen"subscribe_channels=["watchmen"]subscribe_name="watchmen"Start watchmen daemonwatchmendTask Config file[[task]]id=1name="Async Task 1"command="command"args=["arg1","arg2"]dir="/path/to/directory"env={key1="value1",key2="value2"}stdin=truestdout="output.txt"stderr="error.txt"task_type={Async={max_restart=2,has_restart=0,started_at=0,stopped_at=0}}[[task]]id=2name="Periodic Task 1"command="command"args=["arg1","arg2"]dir="/path/to/directory"env={key1="value1",key2="value2"}stdin=falsestdout="output.txt"stderr="error.txt"task_type={Periodic={started_after=0,interval=60,last_run=0,sync=false}}[Async Task]id=1name=Async Task 1command=commandargs=arg1 arg2dir=/path/to/directoryenv=key1=value1 key2=value2stdin=truestdout="output.txt"stderr="error.txt"task_type=asyncmax_restart=2[Periodic Task]id=2name=Periodic Task 1command=commandargs=arg1 arg2dir=/path/to/directoryenv=key1=value1 key2=value2stdin=falsestdout="output.txt"stderr="error.txt"task_type=periodicstarted_after=0interval=60sync=false[{"id":1,"name":"Async Task 1","command":"command","args":["arg1","arg2"],"dir":"/path/to/directory","env":{},"stdin":true,"stdout":"output.txt","stderr":"error.txt","created_at":0,"task_type":{"Async":{"max_restart":2,"has_restart":0,"started_at":0,"stopped_at":0}}},{"id":2,"name":"Periodic Task 1","command":"command","args":["arg1","arg2"],"dir":"/path/to/directory","env":{},"stdin":false,"stdout":"output.txt","stderr":"error.txt","created_at":0,"task_type":{"Periodic":{"started_after":0,"interval":60,"last_run":0,"sync":false}}}]Commandwatchmen -hWatchmenisadaemonprocessmanagerthatforyoumanageandkeepyourapplicationonline24/7

Usage:watchmen[OPTIONS][COMMAND]Commands:runAddandruntasksaddAddtasksreloadReloadtasksstartStarttasksrestartRestarttasksstopStoptasksremoveRemovetaskslistGettaskslisthelpPrintthismessageorthehelpofthegivensubcommand(s)Options:-c,--config<CONFIG>Configfilepath.Default:$HOME/.watchmen/config.toml-g,--generate<GENERATE>Generateconfigfile-e,--engine<ENGINE>Engineforsendmessage[default:sock]-v,--versionPrintversion-h,--helpPrinthelpwatchmen run -hAddandruntasks

Usage:watchmenrun[OPTIONS]Options:-p,--path<PATH>Taskconfigdirectory-r,--regex<REGEX>Taskconfigfilenameregexpattern[default:^.*\.(toml|ini|json)$]-f,--config<CONFIG>Taskconfigfile-n,--name<NAME>Taskname(unique)-c,--command<COMMAND>Taskcommand-a,--args<ARGS>Taskarguments-d,--dir<DIR>Taskworkingdirectory-e,--env<ENV>Taskenvironmentvariables-i,--stdinTaskstandardinput-o,--stdout<STDOUT>Taskstandardoutput-w,--stderr<STDERR>Taskstandarderror-h,--helpPrinthelpwatchmen add -hAddtasks

Usage:watchmenadd[OPTIONS]Options:-p,--path<PATH>Taskconfigdirectory-r,--regex<REGEX>Taskconfigfilenameregexpattern[default:^.*\.(toml|ini|json)$]-f,--config<CONFIG>Taskconfigfile-n,--name<NAME>Taskname(unique)-c,--command<COMMAND>Taskcommand-a,--args<ARGS>Taskarguments-d,--dir<DIR>Taskworkingdirectory-e,--env<ENV>Taskenvironmentvariables-i,--stdinTaskstandardinput-o,--stdout<STDOUT>Taskstandardoutput-w,--stderr<STDERR>Taskstandarderror-h,--helpPrinthelpwatchmen reload -hReloadtasks

Usage:watchmenreload[OPTIONS]Options:-p,--path<PATH>Taskconfigdirectory-r,--regex<REGEX>Taskconfigfilenameregexpattern[default:^.*\.(toml|ini|json)$]-f,--config<CONFIG>Taskconfigfile-n,--name<NAME>Taskname(unique)-c,--command<COMMAND>Taskcommand-a,--args<ARGS>Taskarguments-d,--dir<DIR>Taskworkingdirectory-e,--env<ENV>Taskenvironmentvariables-i,--stdinTaskstandardinput-o,--stdout<STDOUT>Taskstandardoutput-w,--stderr<STDERR>Taskstandarderror-h,--helpPrinthelpwatchmen start -hStarttasks

Usage:watchmenstart[OPTIONS]Options:-p,--path<PATH>Taskconfigdirectory-r,--regex<REGEX>Taskconfigfilenameregexpattern[default:^.*\.(toml|ini|json)$]-f,--config<CONFIG>Taskconfigfile-i,--id<ID>Taskid(unique)-n,--name<NAME>Taskname(unique)-m,--matIsmatchregexpatternbynamae-h,--helpPrinthelpwatchmen restart -hRestarttasks

Usage:watchmenrestart[OPTIONS]Options:-p,--path<PATH>Taskconfigdirectory-r,--regex<REGEX>Taskconfigfilenameregexpattern[default:^.*\.(toml|ini|json)$]-f,--config<CONFIG>Taskconfigfile-i,--id<ID>Taskid(unique)-n,--name<NAME>Taskname(unique)-m,--matIsmatchregexpatternbynamae-h,--helpPrinthelpwatchmen stop -hStoptasks

Usage:watchmenstop[OPTIONS]Options:-p,--path<PATH>Taskconfigdirectory-r,--regex<REGEX>Taskconfigfilenameregexpattern[default:^.*\.(toml|ini|json)$]-f,--config<CONFIG>Taskconfigfile-i,--id<ID>Taskid(unique)-n,--name<NAME>Taskname(unique)-m,--matIsmatchregexpatternbynamae-h,--helpPrinthelpwatchmen remove -hRemovetasks

Usage:watchmenremove[OPTIONS]Options:-p,--path<PATH>Taskconfigdirectory-r,--regex<REGEX>Taskconfigfilenameregexpattern[default:^.*\.(toml|ini|json)$]-f,--config<CONFIG>Taskconfigfile-i,--id<ID>Taskid(unique)-n,--name<NAME>Taskname(unique)-m,--matIsmatchregexpatternbynamae-h,--helpPrinthelpwatchmen pause -hPauseintervaltasks

Usage:watchmenpause[OPTIONS]Options:-p,--path<PATH>Taskconfigdirectory-r,--regex<REGEX>Taskconfigfilenameregexpattern[default:^.*\.(toml|ini|json)$]-f,--config<CONFIG>Taskconfigfile-i,--id<ID>Taskid(unique)-n,--name<NAME>Taskname(unique)-m,--matIsmatchregexpatternbynamae-h,--helpPrinthelpwatchmen resume -hResumeintervaltasks

Usage:watchmenresume[OPTIONS]Options:-p,--path<PATH>Taskconfigdirectory-r,--regex<REGEX>Taskconfigfilenameregexpattern[default:^.*\.(toml|ini|json)$]-f,--config<CONFIG>Taskconfigfile-i,--id<ID>Taskid(unique)-n,--name<NAME>Taskname(unique)-m,--matIsmatchregexpatternbynamae-h,--helpPrinthelpwatchmen list -hGettaskslist

Usage:watchmenlist[OPTIONS]Options:-p,--path<PATH>Taskconfigdirectory-r,--regex<REGEX>Taskconfigfilenameregexpattern[default:^.*\.(toml|ini|json)$]-f,--config<CONFIG>Taskconfigfile-i,--id<ID>Taskid(unique)-n,--name<NAME>Taskname(unique)-R,--matIsmatchregexpatternbyname-m,--moreShowmoreinfo-l,--lessShowlessinfo-h,--helpPrinthelpApache License 2.0LicenseCopyright ahriknow 2022