17

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
[-] CoderSupreme@programming.dev 1 points 11 months ago

Communities / Forums

Resources / Tutorials

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

commandline

2236 readers
12 users here now

founded 3 years ago
MODERATORS