Git Product home page Git Product logo

comet's Introduction

Comet

Comet is a zero dependency Cron management app. Schedule and execute shell commands using Cron syntax.

note: there are a few dev dependencies (typescript, nodemon, pkg) but no compiled ones.

Installation

1. Install the binary

Method 1 - compile from source

git clone https://github.com/lostVkng/comet
cd comet
npm install
npm run build

Clone this directory

Note: requires node.js installed.

npm run package

Build the binary

Method 2 - Download binary from this repo

Download from releases, the binaries are named for OS, just remove the -ubuntu/-macos/-win from the name.

2. Move binary to within PATH

/usr/local/bin is popular place for CLI apps, but nothing preventing you from a different directory and adding it to your path.

3. Create Daemon to run comet server in the background

Sample Daemon examples are in daemons directory. A daemon will allow comet server to run in the background.

Usage

comet list

Lists all cron jobs

comet status

Lists all actively running Cron jobs

comet add -name="xdatafetch.py" "* * * * *" python3 ~/xdatafetch.py

Creates a new cron job with name xdatafextch.py. Add jobs require a name to distinguish them. Newly added jobs are automatically set to active.

comet del xdatafetch.py

Kills and deletes job with name xdatafetch.py

comet start xdatafetch.py

Re-activates inactive job named xdatafetch.py. This job will be ran on the next cron interval.

comet stop xdatafetch.py

De-activates active job named xdatafetch.py. This job will not be ran until activated.

comet kill xdatafetch.py

Kills any actively running process for xdatafetch.py job.

comet server

Starts Comet server, this is needed by any daemon manager to run in the background.

Cron Syntax

Cron syntax allows us to specify when to launch a task with only a space seperated string.

The syntax is seperated as so:

minute hour day(month) month day(week)

* any value
, value list seperator
- range of values
/ step values

Examples:

'* * * * *'

Run every minute/hour/day/month/day of week

'5 4 * * *'

Run every 4th hour and 5th minute for every day/month/day of week

'0 22 * * 1-5'

Run at 22h00 every weekday

comet's People

Contributors

lostvkng avatar

Watchers

 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.