Cron-plus and jsonata: error in 3.1.0-beta.2

When using a jsonata payload in cron-plus eg.

with a basic flow like:

        "id": "5b82d39f1670e2ed",
        "type": "cronplus",
        "z": "8238839dc502e4bd",
        "name": "",
        "outputField": "payload",
        "timeZone": "",
        "persistDynamic": false,
        "commandResponseMsgOutput": "output1",
        "outputs": 1,
        "options": [
                "name": "schedule1",
                "topic": "test",
                "payloadType": "jsonata",
                "payload": "$millis()",
                "expressionType": "cron",
                "expression": "0 */5 * * * * *",
                "location": "",
                "offset": "0",
                "solarType": "all",
                "solarEvents": "sunrise,sunset"
        "x": 340,
        "y": 1240,
        "wires": [
        "id": "7589755339c740ec",
        "type": "debug",
        "z": "8238839dc502e4bd",
        "name": "debug 303",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 550,
        "y": 1240,
        "wires": []

Produces these errors messages:

"Deprecated API warning: Calls to RED.util.evaluateJSONataExpression must include a callback. This will not be optional in Node-RED 4.0. Please identify the node from the following stack and check for an update on npm. If none is available, please notify the node author."


Error at evaluateJSONataExpression (/usr/src/node-red/node_modules/@node-red/util/lib/util.js:777:18) at Object.evaluateNodeProperty (/usr/src/node-red/node_modules/@node-red/util/lib/util.js:675:18) at sendMsg (/data/node_modules/node-red-contrib-cron-plus/cronplus.js:867:39) at CronPlus._inputCallback (/data/node_modules/node-red-contrib-cron-plus/cronplus.js:1432:17) at /usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:210:26 at Object.trigger (/usr/src/node-red/node_modules/@node-red/util/lib/hooks.js:166:13) at CronPlus.Node._emitInput (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:202:11) at CronPlus.Node.emit (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:186:25) at CronPlus.Node.receive (/usr/src/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:494:10) at /data/node_modules/node-red-contrib-cron-plus/cronplus.js:1686:22

I guess cron-plus will require some kind of update.

The flow works though.

1 Like


Issue raised: Error in 3.1.0 beta when payload is a JSONata value · Issue #61 · Steve-Mcl/node-red-contrib-cron-plus · GitHub

fixed in v2.0.0 released today.

As well as some other new features I have been working on (very slowly) since November :astonished:

Running pi4 with ver 3.02 just updated cron plus and to my horror it now says flow stopped due to missing node. It's the cronplus node I just updated

[Edit] under the node in palette manager it says

[Edit again] tried it on a second pi setup identical to first and it does same thing

How can I get back to a working version?
Tried npm install cron-plus@1.5.7
Npm install node-red-contrib-cron-plus@1.5.7
And several other iterations
None worked

Oh dear. Most odd. I apologise. Must be one of the updated dependencies. I will fix later today.

In the mean time, npm install node-red-contrib-cron-plus@1.5.7 should work but you must be in run your .node-red directory and you need to restart node-red afterwards

Ps. What version of node JS are you running node-red on?

Version 16.20.1

Oh and that command worked, thanks

Rolled back the naughty dependency that dropped CommonJS support for ESM.

Just published 2.0.1

It can take up to 30 minutes for the Node-RED catalog to pick up the change. :crossed_fingers:

Installed 2.01 and no error messages

1 Like

Same here. Fixed in 2.0.1.

Great stuff :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.