Comment on What do you prefer for a self hosted calendar?

<- View Parent
Anafroj@sh.itjust.works ⁨1⁩ ⁨year⁩ ago

I organize my crontab by having group of tasks (the programs, the holidays, the housecleaning, etc), and 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.

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')"

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

source
Sort:hotnewtop