dxe / nerd

Matrix chat bot for DxE Tech :robot::speech_balloon:
GNU General Public License v3.0
0 stars 1 forks source link

Remind about team meetings #1

Open alexgleason opened 7 years ago

alexgleason commented 7 years ago

Team meetings occur once per month, the day before the first Sunday of the month.

Not sure how to write this as a cron string, lol. Hopefully it's possible. If not we can write a cron string that schedules a trigger on each Saturday and then check that date against a calendar to determine if that day is the day a meeting occurs.

mleanos commented 7 years ago

Something like this should work..

// reminder set in server.js
nerd.remind({ rule: "0 0 13 1-7 * 6" },
  "Hey all! Don't forget—we have our monthly meeting at 7pm PST."
)

https://github.com/node-schedule/node-schedule#cron-style-scheduling

mleanos commented 7 years ago

Team meetings occur once per month, the day before the first Sunday of the month.

Yea, so this is a bit more complicated, and my example wouldn't work. For some reason I was just thinking the "first Saturday of the month".

I suppose your idea of just scheduling a job to run each Saturday, and then check if the next Sunday is within the first 7 days of the month.

alexgleason commented 7 years ago

I'm not working on this project anymore so feel free to take a crack at it.

I think the work party URLs also have to be changed.