npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

chronos-toolkit

v1.0.0

Published

Chronos Client Tools

Downloads

2

Readme

Introduction

Command line tool for Chronos.

Install with the following command:

npm install -g chronos-toolkit

This will save an executable called chronostoolkit to /usr/local/bin/

Configs and authorization

The default config file (default_config.json) included in the project contains:

  • Path to the file with app key and secret (cannot be overridden from custom config)
  • AUM and Chronos URLs (can be overridden from custom config)

To override AUM and Chronos URLs, as well as to provide Docker credentials, place a file called config.json in ~/.chronos/. Refer to sample_custom_config.json to see what goes into this config file.

If you do not wish to override default localhost AUM and Chronos URLs, do not include the corresponding fields in your custom config.json

Commands

  • chronostoolkit allinfo

Prints a table with description of all the jobs. Sample output:

┌──────────────────────────────────────┬─────────────┬────────────────┬─────────┬───────────┬────────────────┬───────────────────────────────┐
│ ID                                   │ Name        │ State          │ Status  │ Schedule  │ Times Executed │ Next Scheduled Time           │
├──────────────────────────────────────┼─────────────┼────────────────┼─────────┼───────────┼────────────────┼───────────────────────────────┤
│ e02841ef-88b1-47b0-bf11-5e642e332e86 │ testjob1    │ notschedulable │ success │ 0 * * * * │ 1              │ Tue, 25 Jul 2017 18:55:00 GMT │
├──────────────────────────────────────┼─────────────┼────────────────┼─────────┼───────────┼────────────────┼───────────────────────────────┤
│ 3e794a07-36b8-4794-a173-a95de41541f6 │ testjob2    │ notschedulable │ success │ 0 * * * * │ 2              │ Tue, 25 Jul 2017 18:55:00 GMT │
├──────────────────────────────────────┼─────────────┼────────────────┼─────────┼───────────┼────────────────┼───────────────────────────────┤
  • chronostoolkit info {jobID}

Prints information for a job with the provided job ID. Sample output:

┌──────────────────────────────────────┬─────────────┬────────────────┬─────────┬───────────┬────────────────┬───────────────────────────────┐
│ ID                                   │ Name        │ State          │ Status  │ Schedule  │ Times Executed │ Next Scheduled Time           │
├──────────────────────────────────────┼─────────────┼────────────────┼─────────┼───────────┼────────────────┼───────────────────────────────┤
│ e02841ef-88b1-47b0-bf11-5e642e332e86 │ testjob3    │ notschedulable │ success │ 0 * * * * │ 4              │ Tue, 27 Jul 2017 13:55:00 GMT │
├──────────────────────────────────────┼─────────────┼────────────────┼─────────┼───────────┼────────────────┼───────────────────────────────┤
  • chronostoolkit login

If an app key and secret are found in ~/.chronos/credentials.json, this command will print the token. If not found, it will prompt for app key and secret, save them to ~/.chronos/credentials.json and then print token.

  • chronostoolkit publish

Publishes the job with the name provided in your custom config file in ~/.chronos/

  • chronostoolkit remove {jobID}

Removes the job with provided job ID. Sample output:

Removed the job with job ID: e812b3b3-62e1-4df6-90ab-63b5ed55ded9
  • chronostoolkit schedule

Schedules the job with description provided in chronos.json

Job description file needs to have the following format:

{
  "version": "1.0.0",
  "name": "your_job_name",
  "schedule": "0 * * * *",
  "repeat": 0,
  "callback": "http://localhost:3007/jobcallback/uno",
  "check_in_threshold": 240,
  "arguments": "{\"arg1\": 500}"
}

Refer to Chronos documentation for explanation of each field.

  • chronostoolkit stop {jobID}

Force stops the job with the provided job ID. Sample output:

Force stopped the job with job ID:  e812b3b3-62e1-4df6-90ab-63b5ed55ded9
  • chronostoolkit version

Prints version of Chronos. Sample output:

Chronos Server 0.0.1