ClockMonster is a self-hosted service for scheduling one-time or repeating jobs within your system

Overview

ClockMonster

ClockMonster is a self-hosted service for scheduling one-time or repeating jobs within your system. Jobs for now are HTTP POST requests, however in the future will be adding to queues, calling gRPC and more.

This service solves the issue of repeating implementations per-service for time-based events. A simple example of where ClockMonster can come in useful is that your application allows users to create a schedule of times, and you want to get a call to a service when one of the schedule periods start / end.

Note however, ClockMonster is not per-second accurate. You can configure how often you'd like ClockMonster to poll for tasks via the environment variable EXECUTOR_WAIT_SECONDS.

ClockMonster is built to be horizontally scaled if required. However, this service is very lightweight, so unless you are creating a ton of tasks, replication shouldn't be required.

Currently, ClockMonster stores its job data in Postgres. You must provide valid a Postgres database configuration via the environment variables. Eventually, ClockMonster will be able to have multiple data storage methods, so use-case can be best suited. For example, if you're not too worried about job persistence, ClockMonster could run just from Redis, or even an internal memory store.

API documentation

Coming soon. Currently there is a work-in-progress TypeScript API in this repository, but it's not finished yet.
ClockMonster has REST API endpoints to interact with it. There will be documentation for these too soon, so you can implement ClockMonster into a different language, or directly into your system.

How to run ClockMonster

Get it from Docker Hub: https://hub.docker.com/r/hiett/clockmonster

docker pull hiett/clockmonster

Environment variables:
DB_HOST
DB_PORT
DB_USERNAME
DB_PASSWORD
DB_DATABASE
DB_MIGRATION_TABLE (optional)
EXECUTOR_WAIT_SECONDS (default 5)

Developing ClockMonster

To spin up a Postgres instance for testing with this service:
docker run --name clockmonster-postgres -p 5432:5432 -it -e POSTGRES_PASSWORD=clocks -d postgres

To build docker image from this dir:

cd clockmonster
./mvnw package -Pnative -Dquarkus.native.container-build=true
docker build -f src/main/docker/Dockerfile.native-distroless -t hiett/clockmonster .

Make sure to have GraalVM installed with native-image from gu.

You might also like...

CoSky is a lightweight, low-cost service registration, service discovery, and configuration service SDK.

CoSky is a lightweight, low-cost service registration, service discovery, and configuration service SDK.

High-performance, low-cost microservice governance platform. Service Discovery and Configuration Service

Nov 22, 2022

Critter Chronologer a Software as a Service application that provides a scheduling interface for a small business that takes care of animals

Critter Chronologer a Software as a Service application that provides a scheduling interface for a small business that takes care of animals. This Spring Boot project will allow users to create pets, owners, and employees, and then schedule events for employees to provide services for pets.

Jan 28, 2022

TrashEmail is hosted Telegram bot that can save your private email address by offering disposable email address

TrashEmail is hosted Telegram bot that can save your private email address by offering disposable email address

TrashEmail is hosted Telegram bot that can save your private email address by offering disposable email address. It can create, manage, disposable email address and link them with your telegram bot chat.

Dec 28, 2022

Tasks Planner : A minimalist collaborative app for scheduling and managing your tasks with the team and getting notifications through discord.

Tasks Planner : A minimalist collaborative app for scheduling and managing your tasks with the team and getting notifications through discord.

Tasks Planner ✨ Overview Tasks planner is a minimalist collaborative app for planning and managing your tasks with the team and get notifications thro

Dec 1, 2022

💻 Machine Coding - leetcode LLD (coding blox) - It is an Online Coding Platform that allows a user to Sign Up, Create Contests and participate in Contests hosted by Others.

leetcode-lld-flipkart-coding-blox Machine coding - leetcode LLD (coding blox) My Approach : https://leetcode.com/discuss/interview-question/object-ori

Sep 15, 2022

CRUD operation using java springboot microservice hosted in kubernetes env, data stored in mongodb

springboot-mongodb-k8s-parth Brief Introduction Hello Friends, I have created REST API using Springboot and Spring cloud application which performs CR

Nov 11, 2021

Team project within the course of Software System Design and Analysis.

InnoBookCrossing - Application for sharing books at Innopolis Description The application is designed to help people share books with each other. All

Oct 22, 2022

JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.

pact-jvm JVM implementation of the consumer driven contract library pact. From the Ruby Pact website: Define a pact between service consumers and prov

Dec 31, 2022

Android service daemon ,keep background service alive

安卓后台保活2021新姿势 适配华为大部分系列手机,vivo,OPPO 部分机型,小米的不支持,可见小米在对抗后台自保上做得最好 本项目原本是给某个公司合作开发的,最后给了对方SDK之后由于付款问题闹得很郁闷,想着这个代码拿在自己手上也没用,就发出来给大家参考参考。目前分析的结果来看,这个是全网目前

Nov 29, 2022

[INACTIVE] Avian is a lightweight virtual machine and class library designed to provide a useful subset of Java's features, suitable for building self-contained applications.

Avian - A lightweight Java Virtual Machine (JVM) PLEASE NOTE: This project is not currently being developed, maintained, or supported. Feel free to us

Dec 22, 2022

Hdiv CE | Application Self-Protection

Hdiv CE | Application Self-Protection

New to Hdiv? Check this out Hdiv: Application Self-Protection Hdiv is a leading provider of open source software for real-time, self-protected applica

Nov 14, 2022

Apache Drill is a distributed MPP query layer for self describing data

Apache Drill Apache Drill is a distributed MPP query layer that supports SQL and alternative query languages against NoSQL and Hadoop data storage sys

Jan 7, 2023

Bridging IOTA's self-sovereign identities to existing "Web 2.0" OAuth solutions

Bridging IOTA's self-sovereign identities to existing

IOTA Identity Provider Bridging IOTA's self-sovereign identities to existing "Web 2.0" OAuth solutions. NOTE: This plugin has NOT been audited or test

Nov 7, 2022

Microhttp - a fast, scalable, event-driven, self-contained Java web server

Microhttp is a fast, scalable, event-driven, self-contained Java web server that is small enough for a programmer to understand and reason about.

Dec 23, 2022

Java port of Brainxyz's Artificial Life, a simple program to simulate primitive Artificial Life using simple rules of attraction or repulsion among atom-like particles, producing complex self-organzing life-like patterns.

Java port of Brainxyz's Artificial Life, a simple program to simulate primitive Artificial Life using simple rules of attraction or repulsion among atom-like particles, producing complex self-organzing life-like patterns.

ParticleSimulation simple Java port of Brainxyz's Artificial Life A simple program to simulate primitive Artificial Life using simple rules of attract

Oct 5, 2022

A small and easy-to-use one-time password generator library for Java according to RFC 4226 (HOTP) and RFC 6238 (TOTP).

OTP-Java A small and easy-to-use one-time password generator for Java according to RFC 4226 (HOTP) and RFC 6238 (TOTP). Table of Contents Features Ins

Dec 30, 2022

A small and easy-to-use one-time password generator library for Java according to RFC 4226 (HOTP) and RFC 6238 (TOTP).

OTP-Java A small and easy-to-use one-time password generator for Java according to RFC 4226 (HOTP) and RFC 6238 (TOTP). Table of Contents Features Ins

Dec 30, 2022
Releases(2.1.0)
  • 2.1.0(Dec 8, 2022)

    There is a new optional environment variable in the ClockMonster Server:

    BEARER_AUTH_PASSWORD, which can be set to require authorization to interact with ANY clockmonster service route. This can be any value apart from __disabled__, which is the internal default if a password is not defined. __disabled__ operates like ClockMonster has before, whereby it requires no authorization.

    The TypeScript SDK also now supports this. When creating a new JobClient instance, a second parameter is now an object which allows optional configuration. This entire object is optional, but to utilise your new bearer token you've set, do the following:

    const clockMonsterClient = new JobClient("http://clockmonsterurl", {
      bearerToken: "the value of BEARER_AUTH_PASSWORD"
    });
    

    You don't need to include the word Bearer in either place, it and a space is automatically prepended. The only time you will need to include it is if you have written your own client integration.

    Internally, it will set the following header: authorization = Bearer {BEARER_AUTH_PASSWORD}

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Jun 12, 2022)

Owner
Scott Hiett
I write lots of code :)
Scott Hiett
A distributed task scheduling framework

XXL-JOB XXL-JOB, a distributed task scheduling framework. -- Home Page -- Introduction XXL-JOB is a distributed task scheduling framework. It's core d

许雪里 23.3k Jan 9, 2023
Cron utils for parsing, validations and human readable descriptions as well as date/time interoperability.

cron-utils We define crons. And support them. cron-utils is a Java library to define, parse, validate, migrate crons as well as get human readable des

jmrozanec 965 Dec 30, 2022
Distributed lock for your scheduled tasks

ShedLock ShedLock makes sure that your scheduled tasks are executed at most once at the same time. If a task is being executed on one node, it acquire

Lukáš Křečan 2.8k Jan 7, 2023
Apache Aurora - A Mesos framework for long-running services, cron jobs, and ad-hoc jobs

NOTE: The Apache Aurora project has been moved into the Apache Attic. A fork led by members of the former Project Management Committee (PMC) can be fo

The Apache Software Foundation 627 Nov 28, 2022
Time-Based One-Time Password (RFC 6238) and HMAC-Based One-Time Password (RFC 4226) reference implementations and more.

Crypto Time-Based One-Time Password (RFC 6238) and HMAC-Based One-Time Password (RFC 4226) reference implementations and more. Getting Started TOTP ge

Oliver Yasuna 1 May 12, 2022
This is a little self hosted shared planner application server.

VPR-Backend This project includes the backend for the VPR-project. Installation and Getting Started To run the server you first have to install a MySQ

Marc Beyer 2 Feb 5, 2022
Self-hosted Git Server with CI/CD and Kanban

NOTE: We develop OneDev at code.onedev.io for sake of dogfooding. All issues and pull requests should be submitted there Self-hosted Git Server with K

OneDev 10.5k Dec 31, 2022
Govern Service is a lightweight, low-cost service registration, service discovery, and configuration service SDK.

Govern Service is a lightweight, low-cost service registration, service discovery, and configuration service SDK. By using Redis in the existing infrastructure (I believe you have already deployed Redis), it doesn’t need to bring extra to the operation and maintenance deployment. Cost and burden. With the high performance of Redis, Govern Service provides ultra-high TPS&QPS (10W+/s JMH Benchmark).

Ahoo Wang 61 Nov 22, 2022
Messenger(Chat app) is a real time one to one chat application with Push Notifications made using Firebase...

Messenger If you want a APK then create an issue, i'll send the link.. ChatApp is a real time one to one chat application with Push Notifications made

Tales 14 Apr 30, 2022