this post was submitted on 25 Oct 2025
15 points (100.0% liked)

commandline

2171 readers
8 users here now

founded 2 years ago
MODERATORS
 

Use ln -sf to update a symlink after each cron run:

0 */8 * * * TIMESTAMP=$(date +\%Y-\%m-\%dT\%H;\%M;\%S) && LOG="$HOME/logs/${TIMESTAMP}_job.log" && /path/to/script.sh >> "$LOG" 2>&1 && ln -sf "$LOG" "$HOME/logs/latest_job.log"

Any active communities where I can learn more cool things like this?

you are viewing a single comment's thread
view the rest of the comments