Skip to content

leunga1000/kinetic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a580179 · Feb 16, 2025

History

78 Commits
Dec 17, 2024
Jan 27, 2025
Jun 18, 2024
Feb 16, 2025
Dec 13, 2024
Dec 13, 2024
Dec 13, 2024
Jan 27, 2025
Dec 9, 2024
Dec 19, 2024
Dec 9, 2024

Repository files navigation

Screenshot

Kinetic, a process runner

Runs processes on a schedule and monitors results.

This is mostly intended to run in user space.

$ kin log

job-id                                          status  start               end    pid     duration
---------------------------------------------------------------------------------------------------
sync-to-backup-NeP8nb4q                         OK      13:54  ->-          13:55  353842  1m 18s
ER: raise-exception-NePaHZyV                    ER      14:00  ->-          14:00  353983  2s
ER: print-output-NePaIKni                       ER      14:00  ->-          14:00  354000  2s
check-free-mem-NePb7aPc                         OK      14:01  ->-          14:01  354026  2s

(If the line begins with ER: there was error output, but the job may have returned/completed successfully - for this see the status column)

Usage:

kin start

Install and start the kin server

kin log

List job runs

kin edit

Edit job definitions

kin list

List job definitions

kin run <jobname>

Run a job by its name

kin help

See available commands

kin jl <job_id>

Fetch a job run’s log

Configuration file:

Any .toml file in ~/.pm_dir will be loaded. Example config.toml:

[print-output]
schedule="0 13 * * *"
command="python -c 'print(\"hello\");raise Exception(\"2\")'"

[hello]
command="echo hello"

So to run the "hello" job from the command line, you can run kin run hello

Config properties

[suitably-involved-command]                                  <-- jobname
command="cd $HOME/somewhere && getparams.sh | run_program"   <-- command to run
schedule="0 18 * * *"                                        <-- cron schedule to run at, optional
next="hello"                                                 <-- job to run next (comma delimited list ok)
error="print-output"                                         <-- (comma delimited list ook)
timeout=5000                                                 <-- max run length in seconds

Miscellaneous info:

Statuses

OK
ER
GO
CL
TI (Timed out)
SB (Job started before latest boot)
SK (Skipped/gavewayto)

Storage

Config, logs and states are held in $HOME/.kin_dir (symlinks supported)

Installation:

The kin executable file can be downloaded from the RELEASES page and stored in your path (e.g. $HOME/bin)

then running kin start will install and activate a user service

Building the executable yourself:

After cloning repo, install.sh will build the application and distribute it to your $home/bin directory.

About

Process manager

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published