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

signalk-scheduler

v1.4.6

Published

Cron like scheduler for SignalK

Downloads

44

Readme

signalk-scheduler

Cron like scheduler for SignalK. It can execute shell commands and SignalK puts at a prescribed time and day(s). Yes these things can be done using other tools like cron and Node-Red and those are great tools. I wanted something easy to use with little learning curve and right there in the same UI I do everything else. This also has the added benefit of email integration.

Time Schedule Options

You may specify the day(s) of week along with a static time or time based on an event such as sunrise or sunset, You can select any SK Path that will return a Date value. Examples are the environment.sunlight.times.* that are provided by the derived data plugin.

Example Ideas

Shell Commands

  • Backups
  • Log rotation
  • Email disk usage reports (df -h)
  • Daily status report...

SignalK Put

  • Turn a NMEA2000 switch off or on
    • Turn on the anchor light at night, turn it off in the morning...
    • Turn on salon lights of an evening so the boat is lit when you get back...
  • ???

SignalK Puts

  • Similar to the put, but this allows multiple actions per job.

SignalK Backups

  • Creates a SignalK backup at the scheduled time.
  • Optional: Include plugins to allow for offline restore.
  • Optional: Cleanup old backup files by specifying the number of backups to keep.

I'd love to hear other ideas for implementation and will accept pull requests if you would like to add your own.

API

Get a list of all jobs

GET /jobs

Create a new job

POST /jobs/create

The body is the same json that is stored in .signalk/plugin-config-data/signalk-scheduler.json Example:

{
      "name": "Test2",
      "time": "08:00",
      "days": [
        "Monday"
      ],
      "commandType": "Shell",
      "command": "df -h",
      "enabled": true,
      "sendEmail": true,
      "toEmail": "[email protected]"
}

Get details of a job

GET /jobs/{job_name}

Delete a job

DELETE /jobs/{job_name}

Start the job schedule

PUT /jobs/{job_name}/start

Stop the job schedule

PUT /jobs/{job_name}/stop