Skip to content

A simple, distributed task scheduler and runner with a web based UI.

License

Notifications You must be signed in to change notification settings

mikeTWC1984/Cronicle-X

 
 

Repository files navigation

This is a fork of jhuckaby/Cronicle, which adds some more UI features to original project.

install

git clone https://github.com/mikeTWC1984/Cronicle-X; cd Cronicle-X
npm install; node bin/build.js dist
# configure config.json now if needed
bin/control.sh setup; bin/control.sh start
# optional - create symlink for control.sh
ln -s $PWD/bin/control.sh /usr/bin/cronx

you can install it in any folder if needed (not only /opt/cronicle). To uninstall: rm -rf Cronicle-X

New Features

shell plugin - code editor

image

job details - ansi colors fixed, console style view

You can also capture terminal colors using terminal emulator checkbox on shell plugin. It requires script tool which is typically included in the most linux distros. On alpine add util-linux package to get it. Script tool will not redirect stderr (exit code only) and will hang on interactive prompts, so it's not recommended for jobs running on regular schedules.

image

Warning state

use exit code -1 (or 255) to emulate warning. E.g.

echo 'some warning' > &2
exit -1

image

To indicate result (success/warning/error) on email template use [/status] property

Active Directory / External authentication

You can let user to use alternative authentication (username/password verification) mechanism. While creating a user check external authentication check box:

image

If that option is set - user's password/username check will be routed to external mechanism (standard mechanism compares password hashes) and all password update options will be locked. All other steps (user status check/incorrect password handling/session generation) are the same for both methods The default external mechanism is Active Directory. In order to enable it:

  1. in config.json specify ad_domain setting (a.k.a. kerberos realm) if not sure what it is try to ping localhost (you'll likely see domain name added to your hostname), or in powershell run [adsi]"", then if you get something like {DC=CORP,DC=MYCOMPANY,DC=com} the domain name will be corp.mycompany.com (assuming you do it from a windows machine that is logged to your AD domain)
  2. create a new user with external auth box checked. Now that user should be able to login using his AD credentials.

To set up a custom authentication (e.g. http post request)

  • open this file: node_modules/pixl-server-user/user.js (or plugins/user.ad.js before installing cronicle)
  • locate startup function and require any extra modules you need (e.g. request)
  • then locate api_login function and replace ad.authenticate method with your custom one (e.g. request.post )

Debug run mode

If you just want to test your job and run it without chaining/notifications use the debug options before clicking on "Run now" You can also hide test execution from event history/stats. image

Event Dashboard

A custom implementation of Event History using DataTables.net, it pulls last 1000 jobs and adds some extra filtering options. It's also a demo of custom UI component (independent from default framework). To open it - go to history page and click on Event Dashboard

image

Java plugin

If open jdk is installed on your machine you can run java classes as scripts (plugin will take care of creating/compiling/removing temp files). You can also customize classpath and JAVA_HOME (custom java version) using plugin parameters. By default you can put dependency jars (e.g. jdbc drivers) in bin/jars folder. image

Minor updates:

  • edit button added on completed job detail page (for easy back and forth navigation)
  • last N occurences filter on history page (Max rows per event)
  • control.sh setup returns 0 exit code (no error) if setup already completed (useful for docker entrypoints)
  • control.sh - works properly as symlink (thanks to jhuckaby#153 )
  • if using Gitlab's webhooks to trigger job - api key can be used as secret
  • aws-sdk (S3) and AD added to dependencies

Original Project:

https://github.com/jhuckaby/Cronicle

About

A simple, distributed task scheduler and runner with a web based UI.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 95.9%
  • HTML 1.8%
  • CSS 1.4%
  • Shell 0.9%