https://github.com/alivx/crontab-runat
Tiny replacement for crontab as cli
https://github.com/alivx/crontab-runat
cli cron crontab linux python
Last synced: 6 months ago
JSON representation
Tiny replacement for crontab as cli
- Host: GitHub
- URL: https://github.com/alivx/crontab-runat
- Owner: alivx
- License: gpl-3.0
- Created: 2021-01-12T18:55:45.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-01T11:25:10.000Z (about 2 years ago)
- Last Synced: 2025-03-16T16:15:03.322Z (over 1 year ago)
- Topics: cli, cron, crontab, linux, python
- Language: Python
- Homepage: https://github.com/alivx/crontab-runat
- Size: 112 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Runat: A Tiny Replacement for Crontab as cli command

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](https://www.linkedin.com/in/alivx/)**.