ontime-dev / ont

MIT License
0 stars 0 forks source link
Ontime --- ontime Logo

Ont (short for ontime) is a cronjob-like command line tool featuring simpler commands and more robust job management. With ont, you can store jobs in a database, stop them, and restart them at any time.

This project is in the beta phase, and using it in production environments is not recommended at the moment. However, we would appreciate it if you could test it and provide feedback.

How is it different from cronjob and systemd timers?

Get started:

For administrators:

Note: The admin need to be either root user or sudo user.

  1. Install ont on a server (check the installation guide).
  2. Run the script initOnt.sh to create the DB, choose the DB password, and initialze ontd.
    $ wget <script path>
    $ chmod +x init_ont.sh
    $ ./initOnt.sh
  3. Modify the default values in the file /etc/ont/ont.conf as per the environment requirements.
  4. Start the ont daemon as follows:
    $ ont daemon

    The ont daemon can also be started using systemd:

    $ systemctl status ontd.service

    If the file ontd.service doesn't exist, please create it and start the service. You can find a sample in ontd.service file.

  1. To test the installation you can check the version and the help function.
    $ ont -v
    $ ont -h

For users:

Using ont as a user is pretty simple, you just need to run one of the subcommands and pass the arguments.


Installation

  1. Install the binary as follows:

    $ go install -v github.com/ontime-dev/ont@latest
  2. Download the initOnt.sh script:

    $ wget https://raw.githubusercontent.com/ontime-dev/ont/main/scripts/initOnt.sh  
  3. Set the script as executable:

    $ chmod +x initOnt.sh
  4. Execute it to setup ont:

    $ ./initOnt.sh

That's it, ont is installed now. You can modify the configuration parameters in ont.conf as required, and then start the daemon:

$ <path/to/ont> daemon

You can also create a ontd.service file and enable it using systemctl:

$ systemctl enable --now ontd.service