Giter VIP home page Giter VIP logo

crontab-runat's Introduction

Runat: A Tiny Replacement for Crontab as cli command

logo

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.

crontab-runat's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.