Code Monkey home page Code Monkey logo

Comments (22)

knolleary avatar knolleary commented on May 28, 2024

The inject node does not use the external cron command. Does the 'inject at specific time' option not work for you then? What have you tried?

from node-red-docker.

vielmetti avatar vielmetti commented on May 28, 2024

Note that Docker on some systems is prone to clock drift. Two instances of people seeing this:

machyve/xhyve#46
https://forums.docker.com/t/time-in-container-is-out-of-sync/16566

from node-red-docker.

jthomas avatar jthomas commented on May 28, 2024

Hello @rajr0,

Are you still having issues with this? If so, can you help us by answering Nick's questions.

from node-red-docker.

albertskog avatar albertskog commented on May 28, 2024

Hi! I have the same issue with repeat at a specific time not working on my Raspberry Pi (not running the Docker image)!
Edit: Running Node-Red v0.15.2, npm 2.15.11, node v6.9.1 and latest Raspbian (4.4.26-v7+)

from node-red-docker.

jthomas avatar jthomas commented on May 28, 2024

@albertskog does it run at all or just at a later or earlier time?

from node-red-docker.

albertskog avatar albertskog commented on May 28, 2024

From what I can tell so far it never runs automatically, just when I press the button on the node. I also tried setting it up to run every minute, it also does nothing..

from node-red-docker.

techr avatar techr commented on May 28, 2024

Just having inject node and inject at specific time does not generate any injection : (crontab setting seems to be correct)
[
{
"id": "4a97f20f.161c6c",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "a4f30c22.14802",
"type": "inject",
"z": "4a97f20f.161c6c",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "55 22 * * *",
"once": false,
"x": 110,
"y": 60,
"wires": [
[
"8ac23610.84b048"
]
]
},
{
"id": "8ac23610.84b048",
"type": "debug",
"z": "4a97f20f.161c6c",
"name": "",
"active": true,
"console": "false",
"complete": "false",
"x": 307.16668701171875,
"y": 62,
"wires": []
}
]

from node-red-docker.

dceejay avatar dceejay commented on May 28, 2024

does the docker container even have a cron process daemon ?

from node-red-docker.

knolleary avatar knolleary commented on May 28, 2024

@dceejay I refer you to my previous comment - the Inject node doesn't have any dependency on the cron system command.

from node-red-docker.

dceejay avatar dceejay commented on May 28, 2024

ah yes - though the node-cron issue list does have some interesting issues that may be relevant
https://github.com/kelektiv/node-cron/issues

from node-red-docker.

NodeGuy avatar NodeGuy commented on May 28, 2024

I had this problem too. I fixed it by changing the timezone on my host and then rebooting.

from node-red-docker.

evertos avatar evertos commented on May 28, 2024

@NodeGuy, Thank you for the info got exactly the same problem. NodeRed showed me the correct time but the system time was not correct.

Ubuntu/Debian Distros
To change the timezone:

sudo dpkg-reconfigure tzdata

And reboot.

from node-red-docker.

RaymondMouthaan avatar RaymondMouthaan commented on May 28, 2024

Node-RED 1.0.0 is now available on docker hub - https://hub.docker.com/r/nodered/node-red.

This closes this issue.

There are a few changes to the new release, please read the README for further details.

from node-red-docker.

ryanrdetzel avatar ryanrdetzel commented on May 28, 2024

Are we sure this is closed with 1.0? I'm having issues with inject in the official 1.0 docker.

from node-red-docker.

RaymondMouthaan avatar RaymondMouthaan commented on May 28, 2024

@ryanrdetzel, can you provide the flow (json) so I can test it?

from node-red-docker.

ryanrdetzel avatar ryanrdetzel commented on May 28, 2024

I don't even see node-cron in the node_modules.

bash-4.4$ ls node_modules/no
node-pre-gyp/       node-red/           node-red-node-rbe/  node-red-node-tail/ nopt/
bash-4.4$ ls node_modules/no

Simple inject with a time and then a debug node

[{"id":"3de6a7eb.61d858","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"2188d43b.089d6c","type":"inject","z":"3de6a7eb.61d858","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"24 07 * * *","once":false,"onceDelay":0.1,"x":510,"y":325,"wires":[["b925c66a.8ada48"]]},{"id":"b925c66a.8ada48","type":"debug","z":"3de6a7eb.61d858","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":670,"y":325,"wires":[]}]

from node-red-docker.

dceejay avatar dceejay commented on May 28, 2024

the node-cron package is in the core of node-red so will have been minified by the build step. It installs as node_modules/cron

from node-red-docker.

RaymondMouthaan avatar RaymondMouthaan commented on May 28, 2024

I just tested your flow and it works as expected.

The steps I took:

  1. Create a new test container with timezone set to Europe/Amsterdam:
docker run -it -e TZ=Europe/Amsterdam -p 1880:1880 nodered/node-red:latest
  1. Imported the flow you supplied.

  2. Modified the time at in the inject node to trigger it soon.

Screen Shot 2019-10-02 at 13 35 33

note clicking in the debug node on the timestamp changes the way the time shows.

from node-red-docker.

ryanrdetzel avatar ryanrdetzel commented on May 28, 2024

Thanks, I tried that command and it did work so I pulled down the images again and it seems to be fixed. Not sure what happened as I was on 1.0.0 and I'm still on 1.0.0 now but it's working. 🤷‍♂

from node-red-docker.

RaymondMouthaan avatar RaymondMouthaan commented on May 28, 2024

Thanks, I tried that command and it did work so I pulled down the images again and it seems to be fixed. Not sure what happened as I was on 1.0.0 and I'm still on 1.0.0 now but it's working. 🤷‍♂

Glad i could help :-)

Version of NR did not change, the code of NR did not change only a permission issues was solved.

Did you use -e TZ=<your_timezone> in your previous command?

from node-red-docker.

dceejay avatar dceejay commented on May 28, 2024

https://discourse.nodered.org/t/inject-at-a-a-specific-time-isnt-working-with-1-0/16194

from node-red-docker.

pm-mic avatar pm-mic commented on May 28, 2024

I just ran into this issue and needed somewhat more time to get it fixed, and barely anywhere a working answer was provided. Someone mentioned somewhere that you either need to set the variable TZ or you need to link the timezone folders, but not both. In no way could I get the TZ variable to work, but the folder linking did it. For anyone else running into this issue, here is my docker-compose for running mosquitto and node-red with the proper timezone on raspbian buster:

version: "3"
services:
broker:
container_name: mosquitto
image: eclipse-mosquitto
volumes:
- "./mosquitto:/mosquitto"
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
networks:
- localnet
ports:
- "1883:1883"
- "9001:9001"
restart: unless-stopped
node-red:
container_name: node-red
depends_on:
- broker
image: nodered/node-red
volumes:
- "./node-red:/data"
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
user: "0"
networks:
- localnet
ports:
- "1880:1880"
restart: unless-stopped
networks:
localnet:

from node-red-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.