New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-red-contrib-cron-plus

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-cron-plus - npm Package Compare versions

Comparing version 0.4.0 to 1.0.0

coord-parser.js

2

examples/using dates.json

@@ -1,1 +0,1 @@

[{"id":"af7cc061.9494f","type":"comment","z":"58c6b2f2.2dcbbc","name":"Demonstrating fixes times as schedule","info":"","x":170,"y":80,"wires":[]},{"id":"54bcf724.e7a4b8","type":"cronplus","z":"58c6b2f2.2dcbbc","name":"Fixed dates and CRON","outputField":"payload","timeZone":"","options":[{"topic":"fixed dates","payload":"fixed","type":"str","expression":"1609459200000, 2021-12-31 00:00, 2022-12-31 08:00 GMT+8"},{"topic":"cron","payload":"lunch time","type":"str","expression":"0 0 12 * * * 2021-2061"}],"x":390,"y":200,"wires":[["ddb3c04d.09623"]]},{"id":"ddb3c04d.09623","type":"debug","z":"58c6b2f2.2dcbbc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":590,"y":200,"wires":[]},{"id":"1c6c20dd.95ec3f","type":"inject","z":"58c6b2f2.2dcbbc","name":"Get status-all","topic":"","payload":"{ \"command\": \"status-all\" }","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":200,"wires":[["54bcf724.e7a4b8"]]},{"id":"9075620.028c6a","type":"inject","z":"58c6b2f2.2dcbbc","name":"Add a 2 fixed time entries, 30 sec and 1 min from now","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":240,"y":120,"wires":[["1b8876b6.0d8569"]]},{"id":"1b8876b6.0d8569","type":"function","z":"58c6b2f2.2dcbbc","name":"create payload to add 2 dates","func":"let nowPlus30s = (new Date()).addSeconds(30);\nlet nowPlus1min = (new Date()).addSeconds(60);\nmsg.payload = {\n \"command\":\"add\",\n \"name\":\"dynamic date sequence\",\n \"expression\" : [nowPlus30s, nowPlus1min],\n \"payload\":\"dynamic\",\n \"type\":\"str\"\n}\nreturn msg;","outputs":1,"noerr":0,"x":250,"y":160,"wires":[["54bcf724.e7a4b8"]]}]
[{"id":"2f8ea9ba.cc26d6","type":"comment","z":"21106466.70e60c","name":"Demonstrating fixes times as schedule","info":"","x":430,"y":200,"wires":[]},{"id":"7cbe8cdf.a5b3d4","type":"debug","z":"21106466.70e60c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":850,"y":360,"wires":[]},{"id":"298086f6.37939a","type":"inject","z":"21106466.70e60c","name":"Get status-all","topic":"status-all","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":370,"y":360,"wires":[["c5be61bb.16781"]]},{"id":"128cac90.528bb3","type":"inject","z":"21106466.70e60c","name":"Add a 2 dynamic date sequence entries, 30 sec and 1 min from now","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":540,"y":240,"wires":[["a5cda63.977e558"]]},{"id":"a5cda63.977e558","type":"function","z":"21106466.70e60c","name":"create payload to add 2 dates","func":"let nowPlus30s = (new Date()).addSeconds(30);\nlet nowPlus1min = (new Date()).addSeconds(60);\nmsg.payload = {\n \"command\":\"add\",\n \"name\":\"DynamicDates\",\n \"topic\":\"DynamicDates\",\n \"expression\" : [nowPlus30s, nowPlus1min],\n \"type\":\"default\"\n}\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":300,"wires":[["c5be61bb.16781"]]},{"id":"c5be61bb.16781","type":"cronplus","z":"21106466.70e60c","name":"Date Sequence and CRON","outputField":"payload","timeZone":"","persistDynamic":false,"commandResponseMsgOutput":"output1","outputs":1,"options":[{"name":"schedule1","topic":"fixed dates","payloadType":"str","payload":"fixed","expressionType":"dates","expression":"1609459200000, 2021-12-31 00:00, 2022-12-31 08:00 GMT+8","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"},{"name":"schedule2","topic":"cron","payloadType":"str","payload":"lunch time","expressionType":"cron","expression":"0 0 12 * * * 2021-2061","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"}],"x":620,"y":360,"wires":[["7cbe8cdf.a5b3d4"]]}]
{
"name": "node-red-contrib-cron-plus",
"version": "0.4.0",
"description": "A flexible scheduler node for Node-RED (incl dynamic control and Timezone support)",
"version": "1.0.0",
"description": "A flexible scheduler (cron, solar events, simple dates) node for Node-RED with full dynamic control and Timezone support",
"main": "cronplus.js",

@@ -19,3 +19,5 @@ "scripts": {

"crontab",
"timer"
"timer",
"sunrise",
"sunset"
],

@@ -36,5 +38,7 @@ "node-red": {

"dependencies": {
"cronosjs": "^1.4.0",
"cronstrue": "^1.81.0",
"pretty-ms": "^5.0.0"
"coord-parser": "^1.0.0",
"cronosjs": "^1.6.0",
"cronstrue": "^1.94.0",
"pretty-ms": "^7.0.0",
"suncalc2": "^1.8.1"
},

@@ -47,2 +51,2 @@ "maintainers": [

]
}
}
node-red-contrib-cron-plus
============================
_A flexible scheduler node for Node-RED (incl Timezone support)_
_A flexible scheduler (cron, solar events, simple dates) node for Node-RED with full dynamic control and Timezone support_
QUICK DEMO...
-------------
![cron-demo](https://user-images.githubusercontent.com/44235289/84031306-592fa900-a98d-11ea-9e93-c074473aa0c8.gif)
FEATURES
--------
* Schedule by CRON, date and date sequences
* Human readable descriptions of your CRON expression are provided as you type.
* Send timestamp, string, number, boolean, flow variable, global variable, JSON, Buffer or Env variable as the output.
* Schedule by CRON, date sequences and solar events (with offset)
* A human readable description of your expression is provided as you type.
* ![cron-tt](https://user-images.githubusercontent.com/44235289/84030877-afe8b300-a98c-11ea-8a77-be84d840bf5d.gif)
* Multiple schedules can be entered by the node editor UI or dynamically at runtime
* Send a default payload or any of the following: timestamp, string, number, boolean, flow variable, global variable, JSON, Buffer or Env variable as the output.
* Example CRON expressions provided in the dropdown to get you started
* Map popup to help you enter coordinates for solar events
* NOTE: Map is 100% CDN dynamic and requires and internet connection. If there is no internet, the popup will provide information to help you get location coordinates from another source
* ![cron-plus-map](https://user-images.githubusercontent.com/44235289/84031948-79ac3300-a98e-11ea-966c-b77200515030.gif)
* Option to separate command responses from output 1 to seperate 2nd output
* Settable output variable (normally `msg.payload` but it is up to you)
* Multiple schedules can be entered by the UI
* Additional info about the triggered scedule is always send in `msg.cronplus`
* Ability to add, remove, list, stop, start, pause schedules by a payload input permitting full flexability & dynamic control
* Full demo flow provided in node-red editors menu > import > examples.
* Inject-like button to fire the node (available when only one schedule is added)
* View dynamically created schedules in the node editor UI
* Additional info about the triggered schedule is always send in the output message in `msg.cronplus`
* NOTE: if the payload is to "Default Payload", then the content of `msg.cronplus` is moved to `msg.payload`
* Node status updates to show the next event
* NOTE: the status indicator will be shown as a "ring" for dynamic schedules or shown as a "dot" for static schedules
* Full flexability & dynamic control.
* Ability to control via simple topic commands. Examples include...
* remove, remove-all, remove-all-dynamic, remove-all-static
* list, list-all, list-all-dynamic, list-all-static
* export, export-all, export-all-dynamic, export-all-static
* stop, stop-all, stop-all-dynamic, stop-all-static
* start, start-all, start-all-dynamic, start-all-static
* pause, pause-all, pause-all-dynamic, pause-all-static
* Ability to add, remove, list, export, stop, start, pause schedules by a command payload input. Examples include...
* add - add one or more dynamic schedules
* describe - describe solar events or cron expression (without the need to add a schedule)
* useful for creating a [dynamic dashboard like this](https://flows.nodered.org/flow/79a66966a6cc655a827872a4af794b94)
* Demo flows demonstrating many of the capabilities. Import via node-red menu > import > examples.
* Optional timezone setting suppoting UTC and Region/Area (e.g. Europe/London)

@@ -24,3 +52,3 @@

* Harder__
* Harder...

@@ -55,1 +83,4 @@ Alternatively in your Node-RED user directory, typically ~/.node-red, run

* [pretty-ms](https://github.com/sindresorhus/pretty-ms)
* [suncalc2](https://github.com/andiling/suncalc2)
* [coord-parser](https://github.com/naturalatlas/coord-parser)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc