Cli like cron, to run task a specific time
Project description
Runat: A Tiny Replacement for Crontab
Welcome to Runat, a CLI tool that offers a simple and efficient way to replace crontab. It provides a reliable solution for various use cases, including running it inside containers, when crontab is broken, for security compliance, and anything else you may need.
Installation
Runat is easy to install via pip. You can install it using the following command:
pip install runat
Options
To learn more about Runat's options, you can type runat --help
. The following optional arguments are available:
Usage: runat [OPTIONS]
A tiny replacement for cron for different usages.
Args: cron (str): Cron-like syntax string. do_ (str): List of
command or shell script.
Options:
-c, --cron TEXT Cron like syntax "22 23 * * *" [required]
-d, --do TEXT List of command or shell script [required]
--help Show this message and exit.
Usage
Here's how you can use Runat:
runat --cron "01 23 * * *" --do "cd /srv/;bash cleanTemp.sh | tee -a /var/log/cleanTemp.log"
Example Output
Here's an example of what Runat's output might look like:
runat --cron "01 23 * * *" --do "cd /srv/;bash cleanTemp.sh | tee -a /var/log/cleanTemp.log"
> The next run in 23.0 hours, 59.0 minutes, 56.0 seconds
Installation via PyPI
To install Runat via PyPI, simply run the following command:
pip install runat
Development
Runat includes a number of helpers in the Makefile
to streamline common development tasks. You can set up your development environment using the following steps:
### create a virtualenv for development
$ make virtualenv
$ source env/bin/activate
### run runat cli application
$ runat --help
Deployments
Docker
Note
If you want to work on local file, you should mount it to the container using -v
.
To build and distribute Runat using Docker, you can use the following commands:
$ make docker
$ docker run -it runat --help
License
Runat is licensed under the GNU GENERAL PUBLIC LICENSE.
Author Information
The tool was originally developed by Ali Saleh Baker.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file runat-1.0.2.tar.gz
.
File metadata
- Download URL: runat-1.0.2.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.28.1 setuptools/65.6.3 requests-toolbelt/0.8.0 tqdm/4.64.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 874f5906dcc111a9bbbcb1027b8729eb83e9a62bfdb65bb3f0da5f59b8e2cd03 |
|
MD5 | ad18f22a59de3a2b8f6f8e892e69641d |
|
BLAKE2b-256 | d32615979cf1967c8591e23699e96b07ef1641ac36e57ed5e09a5f0644d0eba3 |
File details
Details for the file runat-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: runat-1.0.2-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.28.1 setuptools/65.6.3 requests-toolbelt/0.8.0 tqdm/4.64.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b871a4da02acc16a8b7e3aa9164946200f56c1a075460f8057254ef51de9d3c4 |
|
MD5 | 57f87c5636ef52edb9a1b0bb9f7c412e |
|
BLAKE2b-256 | 9abc05990faa477cc7ce3868617e20f0372625fc12117f881b23f95212919f21 |