Basic example of usage:
##Will print out help
$ cronwrap -h
usage: cronwrap3 [-h] [-c CMD] [-e EMAILS] [-t TIME] [-v [VERBOSE]]
A cron job wrapper that wraps jobs and enables better error reporting and command timeouts.
optional arguments:
-h, --help show this help message and exit
-c CMD, --cmd CMD Run a command. Could be `cronwrap -c "ls -la"`.
-e EMAILS, --emails EMAILS
Email following users if the command crashes or
exceeds timeout. Could be `cronwrap -e
"johndoe@mail.com, marcy@mail.com"`. Uses system's
`mail` to send emails. If no command (cmd) is set a
test email is sent.
-t TIME, --time TIME Set the maximum running time.If this time is passed an
alert email will be sent.The command will keep running
even if maximum running time is exceeded.The default is
1 hour `-t 1h`. Possible values include: `-t 2h`,`-t
2m`, `-t 30s`.
-v [VERBOSE], --verbose [VERBOSE]
Will send an email / print to stdout on successful run.
##Will send out a timeout alert to cron@my_domain.com:
$ cronwrap -c "sleep 2" -t "1s" -e cron@my_domain.com
##Will send out an error alert to cron@my_domain.com:
$ cronwrap -c "blah" -e cron@my_domain.com
#Will not send any reports:
$ cronwrap -c "ls" -e cron@my_domain.com
#Will send a successful report to cron@my_domain.com:
$ cronwrap -c "ls" -e cron@my_domain.com -v
Release files for cronwrap3 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cronwrap3-1.1.0.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cronwrap3-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.7 kB
Release files / cronwrap3-1.1.0.tar.gz
| Download URL | cronwrap3-1.1.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f2c3df90a27660bff4534976c80d7a5f7b56e81711607f09e39649362a84a09
|
|
BLAKE2b-256 checksum How to use checksums |
857d33a8da8777ee053fb754c7b60f1f1234e2cf6beefffae02ae6b099c915de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1
|
Release files / cronwrap3-1.1.0-py3-none-any.whl
| Download URL | cronwrap3-1.1.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4ec3922dca56f30f98f076b042461c45ea0c0f51bb53265e7e68e0b1bd1870b6
|
|
BLAKE2b-256 checksum How to use checksums |
5a1986a5072acf32dcc0302363505cb765fd29b6d881e6de5d4cff476a5c68a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1
|