this post was submitted on 01 Sep 2023
29 points (96.8% liked)

Selfhosted

39206 readers
396 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

I'm looking for a google calendar replacement that isn't nextcloud, has a descent mobile app with widgets, and authentication built in. I've seen plenty of recommendations via search but i'd like to hear what you personally use and what you like about it.

you are viewing a single comment's thread
view the rest of the comments
[–] Anafroj@sh.itjust.works 8 points 1 year ago (1 children)

I'm going to pass for the crazy person around, but so be it : cron.

Cron can be easily configured to send mails (MAILTO variable when using standard cron), provided sendmail is available on the system. If a command called by cron outputs anything, it will send a mail with the content, which is useful by itself to warn when something goes wrong with a cron task, but also allows to do things like this:

0 9 28 9 * echo birthday John

It's really easy to get used to the syntax, it's just going from more precise to less precise, so it's "minute, hour, day, month, *". The last one can usually be ignored (it's the day of the week, I must have used it twice in my life). So here, "0 9 28 9", you read it backward and it gives : September, 28th, 9:00. Piece of cake when you get a bit of practice. And cron is everywhere, so no need to install anything. Although, since I run it on my laptop, I use fcron, which has a nice feature to run ASAP tasks which should have ran is the computer was not shut down. This way, I never miss an alert.

I use it for recurring notes (like birthday, paperwork, house cleaning tasks, holidays, etc), but also as reminders of specific dates when I expect a delivery, have a meeting, etc. For the most important messages, I make it use a script that will make a destkop notification (with notify-send) and have a voice read the message (with mimic). And of course, I also use it to actually launch programs. :)

[–] DontNoodles@discuss.tchncs.de 3 points 1 year ago (1 children)

Sounds good for setting the events up and getting notifications part. A good calender would also let you see the upcoming events in week, month at a glance. Cron entries are non sorted lists. Is there a cron visualizer like they have visualizers for logs?

[–] Anafroj@sh.itjust.works 1 points 1 year ago* (last edited 1 year ago)

I organize my crontab by having group of tasks (the programs, the holidays, the housecleaning, etc). And of those groups, the events (the non recurring tasks) come last. So I just list the crontab (crontab -l) and the list of things to come print to the screen, that block being at the end of the file. It's hard to do better than a text file to list things. :)

I don't know if there is a program that lists like "what is coming this month" if you really want to filter out the rest, but it should be easy enough to write, given the format of cron rules:

crontab -l | grep '*' | awk '{print $4 "," $3 "," $2 "," $1 " " $0 }' | sort -n | grep -E "^$(date '+%-m')"
  • crontab -l : list the crontab
  • grep '*' : keeps only rules (removing blank lines and comments)
  • awk […] : print the whole line ($0), prepend by the 4th field (the month), the 3rd (the day), the 2nd (the hour) and the 1st (the minutes)
  • sort -n : sort everything numerically, so that all tasks are now in their execution date order (I made awk seperate the fields with a , character so it keeps sorting numerically past the first number)
  • date '+%-m : prints the current month, not zero padded (thanks to the '-')
  • grep -E '^date' : keep only lines which starts with the current month number

You put that in a script (like ~/bin/upcoming_events) and you're done. And then, you can call it from cron every monday get what's coming next mailed to you. :)

This could but refined further to display dates in a more friendly format. But as usual, Unix is your friend. :)