| Crates.io | lockex |
| lib.rs | lockex |
| version | 0.1.1 |
| created_at | 2025-10-24 09:05:30.312828+00 |
| updated_at | 2025-10-24 09:16:28.314092+00 |
| description | simple command executor with locking and state |
| homepage | https://codeberg.org/micropanda123/lockex |
| repository | https://codeberg.org/micropanda123/lockex |
| max_upload_size | |
| id | 1898181 |
| size | 21,532 |
Simple utility to help with running long-running processes cyclically.
By default lockex will read lockex.toml file inside current directory. (v0.1.1 update: now you can specify custom config file)
Format:
# Optional path to created lock path, by default '.lockex_lock'
lock_path = "something.lock"
# Optional path to created state path, by default '.lockex_state'
state = "something.state"
# Each executed command is a separate [[commands]] block
[[commands]]
# Required name of ran service
name = "cmd_name"
# Required command that's executed
command = "my_program --parameters"
# Optional time in seconds, when specified,
# lockex will keep last execution time of a command in state file
# and check if given interval passed between executions,
# will skip if less time passed
min_interval = 3600
lockex has 2 commands: run and dry-run, both will:
1 and shows error, skipping executionmin_interval:
dry-run