Article 55G6N Cron task - Last Sunday of Month

Cron task - Last Sunday of Month

by
orangepeel190
from LinuxQuestions.org on (#55G6N)
Hi All,

I am trying to find a suitable cron entry to run a simple script on my RPi - on the last Sunday of the month.

Can someone check my scripting for the cron??

59 23 * * * [ `date -d tomorrow +%d` -eq '01' ] && (/path/of/script/to/run >/dev/null 2>&1)

Will this run the script at 11:59 on the last Sunday of the month?

#####

Would this work to run a script on the First Tuesday of each month - 5 past midnight?
05 0 1-7 * * [ "$(date '+\%a')" = "Tue" ] && (/path/of/script/to/run >/dev/null 2>&1)

Thoughts/Comments always welcome!
Cheerslatest?d=yIl2AUoC8zA latest?i=1zf3GyMk4ho:EN1Q2FsuioE:F7zBnMy latest?i=1zf3GyMk4ho:EN1Q2FsuioE:V_sGLiP latest?d=qj6IDK7rITs latest?i=1zf3GyMk4ho:EN1Q2FsuioE:gIN9vFw1zf3GyMk4ho
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments