Comments (22)
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.
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.
Hello @rajr0,
Are you still having issues with this? If so, can you help us by answering Nick's questions.
from node-red-docker.
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.
@albertskog does it run at all or just at a later or earlier time?
from node-red-docker.
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.
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.
does the docker container even have a cron process daemon ?
from node-red-docker.
@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.
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.
I had this problem too. I fixed it by changing the timezone on my host and then rebooting.
from node-red-docker.
@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.
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.
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.
@ryanrdetzel, can you provide the flow (json) so I can test it?
from node-red-docker.
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.
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.
I just tested your flow and it works as expected.
The steps I took:
- 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
- to find your timezone, please refer to https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
-
Imported the flow you supplied.
-
Modified the
time at
in the inject node to trigger it soon.
note clicking in the debug node on the timestamp changes the way the time shows.
from node-red-docker.
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.
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.
https://discourse.nodered.org/t/inject-at-a-a-specific-time-isnt-working-with-1-0/16194
from node-red-docker.
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)
- ERROR [release 4/7] RUN npm config set python which python3 --global HOT 2
- Define niceness of the process - High priority HOT 1
- Docker images on the Hub are 9 months out of date / not regularly published even when there isn't a Node Red update HOT 21
- No matching manifest for windows/amd64 HOT 2
- NPM fails to install due to running node v14 instead of recommend v16 HOT 6
- TensorFlow nodes can't be installed due to Alpine image incompatibilty HOT 2
- ERROR: failed to solve: process "/bin/sh -c ./known_hosts.sh /etc/ssh/ssh_known_hosts && rm /usr/src/node-red/known_hosts.sh" HOT 8
- Getting errors trying to update Node-red-contrib-bigtimer and node-red-contrib-home-assistant-websocket HOT 13
- latest is actually -16, shouldn't it be -18? HOT 1
- Cannot load external flows for env var FLOWS=http... HOT 1
- Image with Debian and 18 HOT 8
- Crashing on RPi3 armv7l after latest build HOT 8
- docker pull 'missing signature key' HOT 4
- Support Node 20 HOT 4
- Problems accessing the ttyS2 HOT 5
- unhealthy state since v3.0.0 HOT 9
- Docker image with node 18.x core dumped HOT 12
- I'm not able to create mountpath: /data HOT 4
- Cannot install new nodes on fresh Docker image HOT 9
- Node-Red image v3.1.6-18 has CVE-2023-42282 vulnerability HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-red-docker.