Cron-Plus using dynamic schedule to schedule a cron event

Hi All,

I have been using cron-plus with dynamic schedules based on solar events and am trying to set up a "regular" cron event, also dynamic schedule based...

While the solar event ones work fine, my "regular" cron event runs once and then that's it...

Where am I going wrong?

Here is the contents of node that I use to send the timer info to the Cron-plus node to turn on a coffee machine....

var CoffeeMachOnH = global.get("CoffeeMachOnH", "file")|| 0;
var CoffeeMachOnM = global.get("CoffeeMachOnM", "file")|| 0;

var OnTime = {
        "command": "add",
        "name": "Ontime",
      "expression": "0 " + CoffeeMachOnM +" " +CoffeeMachOnH+" * * * *",
        "expressionType": "cron",
        "payloadType": "boolean",
        "payload": "true",
        "limit": 3 
  }
//node.warn(OnTime)

msg.payload = OnTime;
return msg;

Any help would be appreciated!!

Regds
Ed

I'll have a butcher's hook at it soon.

When is the regular event supposed to happen?

And although I use cronplus, maybe posting that node would help.

On hour = 6
On Min = 0

Ok, 06:00. For how long?

Ok, I can't get the cronplus node to work.
Red triangle.

Stuck on what I need to do.

It must simply stay on... I will inject a second dynamic for the offtime....

Ok.

Maybe post that part of the flow. Nodes.
It may help.

And the global config file.
( :blush: )
Ok, the last bit doesn't matter now after I looked at it.

(Sorry for the many replies)

Ok, getting to understand it a bit better now. Slowly.

Can you shown the message you use to try and turn it off?
Because if it stays on and won't turn off: I'd guess that it is that part that needs investigating.

(Oh and paste the cronplus node. As said, I don't know how to get rid of the error (red triangle) and don't want to do something that you haven't.
It could also be that is a factor why it stops working.

Inject this into the cronplus node.

Try this.

[{"id":"01e20815f23b7eb7","type":"inject","z":"0918ee609bf69fc7","name":"stop-all-static","props":[{"p":"payload","v":"","vt":"date"},{"p":"topic","v":"stop-all-static","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"stop-all-static","payload":"","payloadType":"date","x":3930,"y":1780,"wires":[["d3a49db236994fe3"]]}]

This is better.

[{"id":"8af439f5833489b4","type":"inject","z":"0918ee609bf69fc7","name":"stop","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"stop","payload":"Ontime","payloadType":"str","x":3910,"y":1830,"wires":[["d3a49db236994fe3"]]}]

Look at the nodes and you may be able to work out what is going on.

NO PROMISES this is what you want, but I the best I can make of your request.

Ok, so I think I have it sorted...

Seems to have been the problem... This (I think) limits the dynamic schedule to running three times and then shutting down... My requirement is that it runs the schedule infinitely... The symptoms were tricky and a bit misleading... On setup and testing, I invariably run 2 tests on a timer to ensure that it is operating correctly... The first test is an initial "in a few minutes" test to see if it operates at the prescribed time, the second is in a half hour or so to ensure that the timer accepts a new time/time change... Both of which passed... needless to say, with a count limit of 3 on the event, the timer then failed to reinitialize an event after successfully initiating it but once more....

Here's hoping that the coffee will be warm tomorrow morning after the above parameter has been changed to limit:null

Cheers
Ed

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