I want to schedule a task for the second to the last day of each month. I have read this great article about shell scripting the execution. I have also seen that you can use "L" to represent the last day of the month, but I am using CentOS and cannot use the "L" construct.
I want to run the task at 11PM on the second to last day of each month. I hope to construct a command similar to:
0 23 27-30 * * [ "$(date +%d -d tomorrow" = "L" ] && $HOME/path/to/script
Knowing that I can't use L to represent the last day of the month, how can I use this logic to schedule my Cron job?