ioBroker.javascript icon indicating copy to clipboard operation
ioBroker.javascript copied to clipboard

Rules: Cron not working

Open JayJay68 opened this issue 3 years ago • 2 comments

Describe the bug
If you use CRON as trigger, the configured values are not copied to the generated java script.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new script with "Rules"
  2. Configure CRON as trigger, eg.: "20 5 * * 1-5"

grafik

  1. Click on '.Rules / JS' (at the top right corner)
  2. Check the generated script code. You will see something like "0 * * * *" grafik

Expected behavior
The generated script-code should looks like "schedule("20 5 * * 1-5", async fu...."

Screenshots & Logfiles
see above

Versions:

  • JavaScript - Adapter: 5.2.13
  • JS-Controller version: 3.3.23
  • Node version: 12.22.4
  • Operating system: Debian GNU/Linux 10 (buster) 4.14.78-cubox

Additional context

JayJay68 avatar Feb 20 '22 13:02 JayJay68

@GermanBluefox Seems there is a name mixup in TriggerSchedule.js ...the result is written out as attribute "text" but ocode is generated with "cron" and also the ComplexCron Component seems to expect "cron" (?) .... Will be intersting to fix this backward compatible (ok you just need to use "text" if present ...) but thsts too deep React for me ... :-)

Apollon77 avatar Mar 16 '22 09:03 Apollon77

@GermanBluefox and even worse ... Bildschirmfoto 2022-03-22 um 12 01 21

a cron like */1 renders the "comment" from rules config ineffective :-)))

Apollon77 avatar Mar 22 '22 11:03 Apollon77

Hi, with Javascript 5.7.0 this bug is still there. Is a bug fix planned?

JayJay68 avatar Dec 28 '22 20:12 JayJay68

Sure planned ...

Apollon77 avatar Dec 28 '22 21:12 Apollon77

Fixed in 7.x

GermanBluefox avatar Feb 22 '23 12:02 GermanBluefox