Skip to content

Releases: txthinking/z

v20240727

23 Jul 06:36
Compare
Choose a tag to compare

v20240726

22 Jul 08:39
Compare
Choose a tag to compare
add stop subcommand

v20240723

21 Jul 13:24
Compare
Choose a tag to compare
fix: env not work on boot

v20240722

21 Jul 03:10
Compare
Choose a tag to compare
bugfix

v20240720

20 Jul 13:08
Compare
Choose a tag to compare
open source

v20240105

05 Jan 12:02
34649a0
Compare
Choose a tag to compare

bugfix

v20231206

05 Dec 06:32
21bf6c7
Compare
Choose a tag to compare

zhen: process and cron manager

Updated at: 2023-12-05

Context

Old friends know that joker is an ultra-minimalist process management tool. It is not CS architecture, no dependencies, and no need to run a background process in advance. Meanwhile, jinbe can easily manage startup commands.

Recently, I have written some jb scripts that require scheduled tasks to run. Coupled with feedback on joker and jinbe from the group, I am planning to replace jinbe. Thus, zhen was born, a name inspired by Xian Zhen. It possesses the functions of both joker and jinbe, along with optimizations for some special scenarios. However, currently it still partially relies on the existence of the joker command. The system requires an IPv6 stack.

To: TA and Brook Plus and Shiliew users

Install

if you have no joker

nami install joker

install zhen

nami install zhen

Start zhen background at boot

sudo or root required

zhen init

Start zhen background now

sudo or root required

joker zhen background

Usage

No sudo or root required

add a command, reboot and now

zhen brook server -l :9999 -p hello

add a cron command

zhen '0 0 * * *' jb /path/to/script.js

For the same scheduled task, if it is about to run and the previous run has not yet finished, then cancel this run and wait for the next cycle.

Env

As you know, usually when the system just boots up, some environment variables do not exist, such as HOME, and the PATH variable is also relatively concise, and your command may depend on these environment variables, then you can use zhen to set.

For example, set HOME

zhen env HOME /root

For example, set PATH to current PATH

zhen env PATH $PATH

Show all env

zhen env

Network

As you know, usually when the system just boots up, the network may not be ready yet, don't worry, zhen will run all your commands after the network is ready.

More

show all commands

zhen all

show running commands

zhen ps

stop command by SIGTERM

zhen st <id>

restart or start command

zhen rs <id>

remove command

zhen rm <id>

show log of command

zhen log <id>

Comments

v20231205

04 Dec 12:49
35d6a54
Compare
Choose a tag to compare
Update readme.md

v20230426

26 Apr 03:20
Compare
Choose a tag to compare
#11

v20221122

22 Nov 12:21
Compare
Choose a tag to compare
list.hancock