New "one time run" job scheduler for GNU/Linux
I've started on a new project, basically sort of a side project; It is about trying to replace the typical one time task/job scheduling engines/systems, used in GNU/Linux, namely at
, atrm
, atq
, batch
and other similar ones.
I'm calling it hat (hyper-at). The idea is to replace all of the mentioned ones with a single engine, with more option and flexibility.
Here's the README
:
HAT (Hyper-AT) is an one time run job scheduler for GNU/Linux, with an emphasis on usability. It is designed to be a direct replacement of at
(atq
, atrm
), batch
, and other such one time run task scheduling engines/toolsets.
Benefits of hat
:
- Seconds resolution i.e. you can run job at the mentioned second
- Use your shell of choice; you're not bound to
/bin/sh
- Flexible datetime specifications, see https://github.com/heemayl/humantime-epoch-converter
- Will run a scheduled job later when the computer was off at that time, so no job will be missed
- User specific jobs, secured approach
- User based logging, all logs from jobs of a user go in
~/.hatd/logs/
- All-in-one i.e. no separate tool based on job or pattern
- Easy to use
Here is the project on GitHub and GitLab:
GitHub: https://github.com/heemayl/hat
GitLab: https://gitlab.com/heemayl/hat
Update (2018-02-07):
The project is deployment ready.
The installation is pretty simple, one just need to run the install.sh
script. Please see https://github.com/heemayl/hat
After installation, the command to use from shell is hatc
-- only this command should be used for everything involved e.g. schedule jobs, remove scheduled jobs, listing jobs and so on.
Here is a simple example workflow:
% hatc -l [] % hatc -c 0 % hatc --add free 'tomorrow 15:47:57' % hatc -l [ [ "1", { "command": "free", "job_run_at": 1518040077, "use_shell": false } ] ] % hatc -c 1 % hatc -a 'echo $PATH' 'now + 3 mins' bash {'msg': 'Done'} % hatc -l [ [ "1", { "command": "whoami", "job_run_at": 1518040077, "use_shell": false } ], [ "2", { "command": "bash -c \"echo $PATH\"", "job_run_at": 1517999620, "use_shell": "bash" } ] ] % hatc -c 2 % hatc --remove 1 {'msg': 'Queued'} % hatc -l [ [ "2", { "command": "bash -c \"echo $PATH\"", "job_run_at": 1517999620, "use_shell": "bash" } ] ] % hatc -c 1
Comments
Comments powered by Disqus