google / cronutils Goto Github PK
View Code? Open in Web Editor NEWutilities to assist running periodic batch processing jobs
License: Apache License 2.0
utilities to assist running periodic batch processing jobs
License: Apache License 2.0
Original issue 1 created by jaqx0r on 2011-12-09T07:54:55.000Z:
In line 142 must be "Waited %timeout seconds...", now is "Waited 5 seconds..."
runlock
can't handle absolute command paths, and is explicit about why:
$ runlock /usr/bin/true
/tmp/cronutils-kseistrup//usr/bin/true.pid: No such file or directory
runstat
probably has the same problem, but is more subtle about why it fails:
$ runstat /usr/bin/true
mkstemp: No such file or directory
Both commands should probably either create the missing path in /tmp/cronutils-$USER
before running command
, or substitute the directory separator with some other character, although the latter solution may lead to ambiguous filenames (e.g., /path/to/command
โ path_to_command
vs. the command path_to_command
in $PATH
).
Another solution could be to create a lockfile sha256(command + args)
and symlink it to $(basename $command).$PID
to enable the user to find the file.
Sanitizing command paths for double separators and more is probably also a good idea:
$ pwd # we're just at home, having fun
/home/kseistrup
$ ../../usr/bin/date +%Y # ugly, but it works
2021
$ runlock ../../usr/bin/date +%Y # runlock will attempt to create a lockfile outside tmp/cronutils-$USER
/tmp/cronutils-kseistrup/../../usr/bin/date.pid: Permission denied
$ runlock /usr/bin/true # yields unpretty double slash in lock filename
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.