{"id":13646,"library":"node-red-contrib-cron-plus","title":"Flexible Scheduler Node for Node-RED","description":"node-red-contrib-cron-plus is an actively maintained Node-RED custom node providing robust scheduling capabilities within Node-RED flows. Currently stable at version 2.2.4, it offers versatile scheduling options including standard cron expressions, solar events (e.g., sunrise, sunset, civil twilight with offsets), and fixed date sequences. Releases often include bug fixes and minor enhancements, with major versions introducing significant features or architectural changes. Key differentiators include its comprehensive dynamic control via input messages, full timezone support, an intuitive UI with a cron expression builder, a map for solar coordinate selection, and options for outputting various payload types. It's specifically designed for the Node-RED environment, allowing for visual configuration and integration into flow-based programming paradigms, rather than being a standalone JavaScript library.","status":"active","version":"2.2.4","language":"javascript","source_language":"en","source_url":"https://github.com/Steve-Mcl/node-red-contrib-cron-plus","tags":["javascript","node-red","schedule","scheduler","timer","timer node","cron","cronplus","cron plus"],"install":[{"cmd":"npm install node-red-contrib-cron-plus","lang":"bash","label":"npm"},{"cmd":"yarn add node-red-contrib-cron-plus","lang":"bash","label":"yarn"},{"cmd":"pnpm add node-red-contrib-cron-plus","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package provides a Node-RED custom node, not a standalone JavaScript library. Its functionality is accessed through the Node-RED visual editor by adding the 'cron-plus' node to a flow.","wrong":"import { CronPlus } from 'node-red-contrib-cron-plus';","symbol":"cron-plus","correct":"Install via Node-RED Palette Manager or `npm install node-red-contrib-cron-plus` in your Node-RED user directory, then drag the 'cron-plus' node from the palette into your flow."},{"note":"Dynamic schedules require a structured `msg.payload` object with at least `schedule` and `payload` properties, and optionally an `id` for management.","wrong":"msg.payload = '0 * * * *'; return msg;","symbol":"Dynamic Schedule Input (add command)","correct":"msg.topic = 'add'; msg.payload = { payload: 'hello', schedule: '0 * * * *', id: 'my-dynamic-schedule' }; return msg;"},{"note":"Control commands are typically sent via `msg.topic` and can include filters like `-all`, `-dynamic`, `-static`, `-active`, or `-inactive` to target specific schedule types.","wrong":"msg.payload = 'stop-all-dynamic'; return msg;","symbol":"Control Commands (stop/start/remove)","correct":"msg.topic = 'stop-all-dynamic'; return msg;"}],"quickstart":{"code":"[{\"id\":\"d1b5c9e4.72147\",\"type\":\"inject\",\"z\":\"aefd1b5c.d1148\",\"name\":\"\",\"props\":[{\"p\":\"payload\"},{\"p\":\"topic\",\"vt\":\"str\"}],\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"topic\":\"\",\"payload\":\"true\",\"payloadType\":\"bool\",\"x\":120,\"y\":120,\"wires\":[[\"f2a1b9c8.d73e0\"]]},{\"id\":\"f2a1b9c8.d73e0\",\"type\":\"cronplus\",\"z\":\"aefd1b5c.d1148\",\"name\":\"Every 15 Seconds\",\"outputField\":\"payload\",\"timeZone\":\"Europe/London\",\"persistDynamic\":false,\"outputs\":1,\"options\":[{\"topic\":\"cron-trigger\",\"payloadType\":\"str\",\"payload\":\"triggered!\",\"expression\":\"0/15 * * * * * *\"}],\"x\":340,\"y\":120,\"wires\":[[\"e7f0d8c2.b12a3\"]]},{\"id\":\"e7f0d8c2.b12a3\",\"type\":\"debug\",\"z\":\"aefd1b5c.d1148\",\"name\":\"Debug Output\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"true\",\"targetType\":\"full\",\"statusVal\":\"\",\"statusType\":\"auto\",\"x\":560,\"y\":120,\"wires\":[]}]","lang":"json","description":"This Node-RED flow demonstrates a basic cron-plus node configured to trigger every 15 seconds, sending a 'triggered!' payload to the debug sidebar."},"warnings":[{"fix":"Upgrade to `node-red-contrib-cron-plus@2.0.1` or higher.","message":"Version 2.0.0 initially introduced an ESM compatibility issue with its dependencies, which was rolled back in v2.0.1 to a CommonJS version. Ensure you are using v2.0.1 or newer to avoid potential module resolution problems.","severity":"breaking","affected_versions":"2.0.0"},{"fix":"Ensure your Node-RED instance or browser (if configuring) has internet access when using the map. Otherwise, manually input latitude and longitude.","message":"The map popup used for selecting solar event coordinates requires an active internet connection to function correctly. Without internet, it will provide static information to assist in manual coordinate entry.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"If you need both the original `msg.payload` and `msg.cronplus` details, choose a different 'payload type' (e.g., string, object, JSONata) or map the `msg.cronplus` object to a different `outputField`.","message":"When 'Default Payload' is selected as the output type, the full `msg.cronplus` object (containing schedule details) is moved to `msg.payload`, overwriting any existing `msg.payload` content.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Always be explicit about targeting dynamic or static schedules with appropriate command suffixes. Review the available commands in the node's documentation or built-in help.","message":"Commands to manage schedules (e.g., `remove`, `stop`, `start`) can be filtered by `dynamic` or `static`. Forgetting to specify the correct filter (e.g., `remove-all-dynamic` vs `remove-all-static`) can lead to unexpected behavior or schedules not being controlled as intended.","severity":"gotcha","affected_versions":">=1.5.0"}],"env_vars":null,"search_vec":"'2.2.4':36 'activ':16 'allow':120 'architectur':74 'base':129 'bug':62 'builder':96 'capabl':26 'chang':75 'civil':51 'comprehens':80 'configur':123 'contrib':11 'control':82 'coordin':101 'cron':12,44,94,148,150 'cronplus':149 'current':32 'custom':21 'date':57 'design':113 'differenti':77 'dynam':81 'e.g':48 'enhanc':66 'environ':119 'event':47 'express':45,95 'featur':72 'fix':56,63 'flexibl':1 'flow':31,128 'flow-bas':127 'full':86 'includ':42,61,78 'input':84 'integr':125 'introduc':70 'intuit':90 'javascript':137,139 'key':76 'librari':138 'maintain':17 'major':68 'map':98 'messag':85 'minor':65 'node':3,6,9,19,22,29,117,141,147 'node-r':5,18,28,116,140 'node-red-contrib-cron-plus':8 'offer':38 'offset':54 'often':60 'option':41,104 'output':106 'paradigm':131 'payload':108 'plus':13,151 'program':130 'provid':23 'rather':132 'red':7,10,20,30,118,142 'releas':59 'robust':24 'schedul':2,25,40,143,144 'select':102 'sequenc':58 'signific':71 'solar':46,100 'specif':112 'stabl':33 'standalon':136 'standard':43 'sunris':49 'sunset':50 'support':88 'timer':145,146 'timezon':87 'twilight':52 'type':109 'ui':91 'various':107 'versatil':39 'version':35,69 'via':83 'visual':122 'within':27","created_at":"2026-04-20T01:55:35.085676+00:00","updated_at":"2026-04-20T01:55:35.085676+00:00","problems":[{"fix":"Ensure `msg.payload` is an object containing `schedule` (cron string, solar event, or date array) and `payload` (the value to send) when `msg.topic` is 'add'.","cause":"Attempting to add a dynamic schedule with an incorrectly formatted `msg.payload` or missing required properties like `schedule` or `payload`.","error":"Error: 'add' command requires a valid schedule object in msg.payload"},{"fix":"Provide valid latitude and longitude coordinates in the node configuration, either directly or via an environment variable, ensuring they are accessible to the node.","cause":"A solar schedule is configured but lacks valid latitude and longitude coordinates, which are essential for calculating solar events.","error":"Solar event coordinates are missing or invalid."},{"fix":"Verify that your Node.js version is `>=8.0.0`. Try reinstalling the package (`npm install node-red-contrib-cron-plus`) in your Node-RED user directory (`~/.node-red`) or via the Node-RED Palette Manager.","cause":"The installed Node-RED version or underlying Node.js runtime does not meet the minimum requirements, or the package installation is corrupted.","error":"Node-RED cannot load node: cron-plus (likely due to Node.js version or corrupted install)"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":"https://flows.nodered.org/node/node-red-contrib-cron-plus","github":"https://github.com/Steve-Mcl/node-red-contrib-cron-plus","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/node-red-contrib-cron-plus","openapi_spec":null,"status_page":null,"smithery":null,"categories":["workflow"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-18","install_tag":null}}