Have the monthly meeting reminder automatically avoid Fridays, Saturdays, and Sundays
E.g. don't allow them to happen on Fri, Sat, Sun.
Maybe encoding this in a crontab line would be to weird. We could
instead delegate to meeting.rb the "is it time to send an email?"
- run meeting.rb everyday, with a command-line parameter that
triggers the desired behavior, and without --date;
- either teach meeting.rb what the desired behavior is, i.e.
only send email when it thinks it should (based on the algorithm
you've picked); or do the computation by hand for the next 2 years,
write the result in some YAML file, and teach meeting.rb to use
this data as part of its input. With the second way,
each team who wants a meeting reminder can then build their
own schedule (including exceptions to the general rule) manually or
programmatically and feed meeting.rb with it; it requires yet
another Git repo to store the data, giving access to that repo to
the right people, and programming meeting.rb defensively enough, so
it might require a little bit more work.
I think we could (and perhaps should) update the time of the meeting in the current cronjob without waiting for the date to be computed in a more clever way: the former is currently always wrong, while the latter will only occasionally be wrong. sajolida, do you want a ticket for that?
#12 Updated by muri about 1 month ago
i've written a python script that can be used to send a meeting reminder. it was easier for me than to get into ruby ;) if its not useful, no worries, it was fun either way ;)
by default it shows the next meeting date.
/meeting.py The monthly Tails meeting in February will be on Tuesday 06. February 2018
if the meeting falls on fr,sa,su it add 3 days to the meeting date.
With -r one can set multiple days in advance, when a reminder should be sent:
./meeting.py -r 10,24 The monthly Tails meeting in February will be on Tuesday 06. February 2018 One reminder would be sent on Saturday 27. January 2018. One reminder would be sent on Saturday 13. January 2018 - thats today!
With -mail it outputs the invitation mail on stdout, with -sendmail (and an email address via --to) it sends the invitation to that address via local smtp server. with -e/--encrypt and an email address it encrypts the output/the mail for that email address (for that, the key needs to be in the keyring of the user running the script and key in the keyring must not be expired).
If -r and -(send)mail are combinded, the invitation is only sent/printed to stdout if the day the script is run is a 'reminder day'.
(update 20180115: changed -d to -r and now -d is used for setting the day the meeting should be. description above adapted accordingly)
#16 Updated by u about 1 month ago
- Assignee set to sajolida
- someone who knows what the interface (input, output) of the script should be to check it satisfies our needs (sajolida?);
- someone to review the code (intrigeri);
- someone to deploy it somewhere (depends on whether we want to take this opportunity to move it to our infra (#7763, and then intrigeri can do this as a volunteer) or not (and then it has to be sajolida))
So i'm now assigning this to sajolida for the time being and let him take the next steps described above.