Giter VIP home page Giter VIP logo

cronjob-manager's Introduction

cronjob-manager

Docker Cloud Build Status Docker Cloud Automated build License

Dashboard

Whats is cronjob-manager?

The aim for this project is for dockerized environments. Containerized tasks asks for a containerized manager.

Usage

You will probably want your tasks to persist after container recreation. So create a volume, and pass it as a mountpoint.

docker volume create cronmanager-data

You will also want the job manager to access your other containers, so it can manage them. For that, pass /var/run/docker.sock as a mountpoint.

This is a cronjob schedule related image, which is very time sensitive. So it is very important to get the your time settings right. Luckily this image supports the TZ environment var for setting the timezone, so no worries. Just make sure to get it right like in the example below.

The container exposes port 80 for using the web interface and the API, just forward that port to a port on your host. The web interface is located at http://your.hostname:port/. The API docs are below.

Now to run the image:

docker run \
-p 80:80 \
-v cronmanager-data:/usr/src/app/.node-persist \
-v /var/run/docker.sock:/var/run/docker.sock \
-e TZ="America/Sao_Paulo" \
edmur/cronjob-manager

API

The web interface uses a REST API on the back-end that can also be called externally.

  • GET Information
    Retrieve information about crontab.
http://your-host/api/info
  • GET Time
    Get current server date and time information.
http://your-host/api/time
  • GET Jobs
    Retrieve a list of existing jobs.
http://your-host/api/jobs
  • GET Job
    Retrieve information about specific Job.
http://your-host/api/jobs/{id}
  • GET Job Logs
    Retrieve logs from specific Job.
http://your-host/api/jobs/{id}/logs
  • DELETE Job
    Delete a Job.
http://your-host/api/jobs/{id}
  • POST Jobs
    Create a new Job.
http://your-host/api/jobs

Headers

Field Type Value
Content-Type String application/json

Body

Field Type Description
name String A custom name for your Job.
cron String The cron schedule expression.
command String The name of the container to run.
commandType String The command to execute on the container.
active Boolean If the job is enabled or not.
  • PUT Jobs
    Update information of existing job.
http://your-host/api/jobs/{id}

Headers

Field Type Value
Content-Type String application/json

Body

Field Type Description
name String A custom name for your Job.
cron String The cron schedule expression.
command String The name of the container to run.
commandType String The command to execute on the container.
active Boolean If the job is enabled or not.

To Do

  • Have more ideas...

License

This project is open-source software licensed under the MIT license.

cronjob-manager's People

Contributors

rumd3x 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.