Skip to content

Releases: txthinking/z

v20250103

Choose a tag to compare

@txthinking txthinking released this 04 Jan 02:20
s r d wait command exit; support openwrt

v20240927

Choose a tag to compare

@txthinking txthinking released this 27 Sep 05:21
  • optimize auto-start on boot under certain systems
  • bugfix

v20240727

Choose a tag to compare

@txthinking txthinking released this 23 Jul 06:36
fixed #9

v20240726

Choose a tag to compare

@txthinking txthinking released this 22 Jul 08:39
add stop subcommand

v20240723

Choose a tag to compare

@txthinking txthinking released this 21 Jul 13:24
fix: env not work on boot

v20240722

Choose a tag to compare

@txthinking txthinking released this 21 Jul 03:10
bugfix

v20240720

Choose a tag to compare

@txthinking txthinking released this 20 Jul 13:08
open source

v20240105

Choose a tag to compare

@txthinking txthinking released this 05 Jan 12:02
34649a0

bugfix

v20231206

Choose a tag to compare

@txthinking txthinking released this 05 Dec 06:32
21bf6c7

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

Choose a tag to compare

@txthinking txthinking released this 04 Dec 12:49
35d6a54
Update readme.md