Code Monkey home page Code Monkey logo

clockwork_web's Introduction

Clockwork Web

A web interface for Clockwork

View the demo

  • see list of jobs
  • monitor jobs
  • disable jobs

🍊 Battle-tested at Instacart

Build Status

Installation

Add this line to your application’s Gemfile:

gem "clockwork_web"

And add it to your config/routes.rb.

mount ClockworkWeb::Engine, at: "clockwork"

Be sure to secure the dashboard in production.

To monitor and disable jobs, hook up Redis in an initializer.

ClockworkWeb.redis = Redis.new

Basic Authentication

Set the following variables in your environment or an initializer.

ENV["CLOCKWORK_USERNAME"] = "andrew"
ENV["CLOCKWORK_PASSWORD"] = "secret"

Devise

authenticate :user, ->(user) { user.admin? } do
  mount ClockworkWeb::Engine, at: "clockwork"
end

Monitoring

ClockworkWeb.running?
ClockworkWeb.multiple?

Customize

Change clock path

ClockworkWeb.clock_path = Rails.root.join("clock") # default

Turn off monitoring

ClockworkWeb.monitor = false

History

View the changelog

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

To get started with development:

git clone https://github.com/ankane/clockwork_web.git
cd clockwork_web
bundle install
bundle exec rake test

clockwork_web's People

Contributors

andyw8 avatar ankane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

clockwork_web's Issues

Temporarily disable a scheduled job

The ability to disable a scheduled job is very useful when debugging issues but there's a risk of failing to enable the jobs again afterwards.

I'd like to see a feature in the UI where you can "Disable for ..." (pick hours, minutes).

If that's something you'd be interested in merging @ankane then I'm happy to write up the code in a pull request.

CSRF Vulnerability

Clockwork Web is vulnerable to cross-site request forgery (CSRF) with Rails < 5.2. This vulnerability has been assigned the CVE identifier CVE-2023-25015.

Versions Affected: 0.1.1 and below
Fixed Versions: 0.1.2

Impact

Clockwork Web is vulnerable to cross-site request forgery (CSRF) with Rails < 5.2.

A CSRF attack works by getting an authorized user to visit a malicious website and then performing requests on behalf of the user. In this instance, actions include enabling and disabling jobs.

All users running an affected release on Rails < 5.2 should upgrade immediately.

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.