Re: [Tails-project] New time for Tails contributors meetings…

Delete this message

Reply to this message
Autor: intrigeri
Data:  
Dla: Public mailing list about the Tails project
Temat: Re: [Tails-project] New time for Tails contributors meetings? [Was: Tails contributors meeting: Friday March 03]
sajolida:
> Now, I feel a bit scared and lazy about encoding this into a cron job
> scheduling, though it might not be complicated for someone more skilled
> than me at scripting.


> So far I have in my crontab:


> 0 0 24 * *    DATE=$(date --date="$(date '+\%Y-\%m-03 +1 month')" +\%F) ;
> ruby $HOME/meeting/meeting.rb --locale en_US.UTF-8 --template
> $HOME/monthly-meeting.eml --date $DATE --subject "Tails contributors
> meeting: $(date --date=$DATE '+\%A \%B \%d')" --from
> sajolida@??? --to "tails-dev@??? tails-project@???
> tails-ux@??? tails-l10n@???"


> Anybody feel like helping me calculate $DATE with this new logic?


I would not even try to do that in weirdly escaped shell in a crontab
line. I bet some shell scripting lovers would do it that way, but
don't count on me to maintain their creation. I would instead delegate
to meeting.rb the "is it time to send an email?" decision, i.e.:

* 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. I slightly prefer the second way,
because then each team who wants a meeting reminder can 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.

Cheers,
--
intrigeri