UPDATE: V1.2.1 node-red-contrib-cron-plus scheduler (incl solar events and Timezone support)

@afelix - I created something similar a while ago when a family member was ill (and I kept forgetting her meds!!)
The biggest failing I found was that if I was busy - on phone, cooking, showering etc, I'd acknowledge the alert, but then a little later forget to give the meds... sound familiar??

I wanted to create (but never got around to it) an interface with a 'done' & 'snooze' button, so if I got distracted, the alert would sound again 10 minutes later, and re-occur until I pressed 'done'.

1 Like

I can actually do that with Pushcut, but haven't gotten around yet to set it up properly. Setting an action to the alert that when clicking the "done" button/"snooze" button a message is POSTed back to Node-RED (would work as long as I'm local) to either acknowledge the action, or send it again 10 minutes later.

1 Like

That sounds ideal. I've never heard of Pushcut, but I'll check it out.

Ah, it's an app for apple lovers - no android version!

It's an app specifically to connect push messages to Apple's own Shortcuts system, hence the name. So you can start Shortcuts running on your phone/tablet through a notification being send, where you are in control of which notifications and when. I use it with another Apple-only app: Pythonista

With Telegram, you can do it both ways with a simple command.

I finally got round to building a dashboard controlled demo...

Dynamic cron schedules / timers via dashboard control

Hopefully of some use to people

(Apologies for spamming - I first replied to a another thread then realised I should have updated this thread first & simply posted a link to this entry - live and learn)

7 Likes

UPDATE V0.4.0 released & published in NPM

  • Fix bug with some cron expressions not parsing correctly
  • Improve editor layout
    • moved the dynamic cron description to a tooltip to reduce need for scrolling
    • maximized the schedule list size

Should be in the flow library and pallet soon

2 Likes

This is eithor a docup or a bug. Look at the time (I'm in the US east coast). It is 9:39 AM. The doc for the node says 0 0 12 * * * means it will run everyday at noon, which is 2 hours and 20 minutes and some seconds away. However the yellow description area says it will next run in 22 hours and 20 minutes and a 27 seconds.

Something doesn't jib.

Do you have the latest version because there were certainly timezone issues in the previous version

Sorry I should have added it is v0.4.0 - I upgraded after I saw the issue, restarted NR nand cleared the browsers cache and even used another browser. Same issue shows up.

Where is node-red running and what is the timezone on that machine? -4h?

Also, what is the timezone where the browser is running?

Looks like a bug. Bah.

Friday bug tracking is Verboten!

1 Like

Just noticed localhost in browser address (so I know node-red and browser are on same machine)

So could you also tell me what version of nodejs and node-red please? Have a sneaky suspicion on something.

Here you go Steve
25 Oct 19:07:19 - [info] Node-RED version: v1.0.2
25 Oct 19:07:19 - [info] Node.js version: v10.15.3
25 Oct 19:07:19 - [info] Darwin 17.7.0 x64 LE
25 Oct 19:07:23 - [info] Dashboard version 2.17.1 started at /ui

Running on a Mac macOS 10.13.6

And just to confirm, your Mac is set to GMT-4 right?

Oh and one other thing., If you don't mind, leave that flow in operation with the browser open and a debug node attached - I believe it will trigger at system time 12:00 (I hope anyway).

Or attach a flogger or file log or something so we can determine when it triggers.

Either way, it will give a head start.

Thanks for your support

yes it is set to GMT-4 - I'll leave it running overnight
would it help if I changed my system clock and did some testing?

Also here are the settings with the Timezone option filled in
Timezone-America-New_York

and the Tmezone option empty

Timezone-empty

@Steve-Mcl
Well it did finally fire, here is the debutg

10/26/2019, 8:00:00 AMnode: d63353cd.3ae53
noon : msg : Object
object
  cronplus: object
    triggerTimestamp: 1572091200000
    status: object
      type: "static"
      isRunning: true
      count: 1
      limit: 0 
      nextDescription: "in 1 day"
      nextDate: "2019-10-27T12:00:00.000Z"
      description: "At 12:00 PM"
    config: object
      name: "noon"
      expression: "0 0 12 * * *"
      payload: "noon"
      type: "str"
      limit: null
  topic: "noon" 
  payload: "noon"
  _msgid: "e8e42d3.fe32cd"

Hi.

So I'm still in no position to debug this but the notes and info will help when I get to it (likely a few days yet)

So that timestamp 1572091200000 equates to Saturday, 26 October 2019 12:00:00 which is obviously correct however I assume it happened at 8am your time?

Timezones are sooooo confusing. Everything I've seen so far looks right (even your first screen shot is kinda correct (add 4h to your time and it's correct) but it's incorrect for you) dammit haha.

Thanks for all feedback so far. If you find anything else, let me know, otherwise I'll get back to you when I can.

1 Like

Yes it did happen at 8AM

Timezones are sooooo confusing.

oh yeah it's mess. If you haven't seen it, you need to watch this video https://www.youtube.com/watch?v=-5wpm-gesOY :rofl:

2 Likes

His advice to "leave it to experts" is spot on. Here's an expert having some fun. (For some reason the video does not open at the start. You'll have to roll back, sorry.)

1 Like