Coder Social home page Coder Social logo

cron-job-dashboard's Introduction

Cron Job Dashboard

This project has an API that is intended to be called by you reccuring jobs when they start, finish or fail. This can be used for any type of recuring job, not just a cron job.

From this, the dashboard will then give you information about how often they run, if they have failed recently and how long they take to run.

The documentation for the project can be found here. An instance of the project is also hosted here

Credentails

To log into 35.176.161.114 in order to evaluate the project please use email: [email protected], password: password. This account has some example jobs, inlcuding one that is being consistently run every 5 mins.

Installation

After cloning the repo the package can be instlled with npm.

cd ../cron-job-dashboard
npm install

This should install all of the dependancies aswell.

Getting Started

To start the project run:

npm start

When starting the project, it should display the host and port it is listening on.

Hosting

Note that if you wish to view the project on another device to the one it is being hosted on, the you will need to set SERVER_HOST=0.0.0.0 in the .env file (or whatever the IP address of you machine is). By default it is only accessable from the local machine.

Example

If you were to write a cron job running program, to monitor it you would write:

BASE_URL="http://35.176.161.114/api/job/<Job Name>"
AUTH="Authorization: Bearer <token>"
curl -X POST ${BASE_URL}?action=start --header "${AUTH}" && \
(program && curl -X POST ${BASE_URL}?action=stop --header "${AUTH}") || \
curl -X POST ${BASE_URL}?action=fail --header "${AUTH}"

The API can be called from any language.

Limmitations

Currently the job name has to be manually URL encoded. This could be resolved by writing a small program that is called with the job name and the action and makes the API call.

Users are not able to reset their password if they forget it. This would involve sending emails which would be more complexity.

The API and app are served over HTTP instead of HTTPS. Changing this would just be a matter of getting a cerfiticate.

cron-job-dashboard's People

Stargazers

 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.