I am trying to run a job on the first weekday of each month with the following crontab entries:
00 07 1-3 * * [ "$(date '+\%a')" == "Mon" ] && echo "Its Monday!"
00 07 1 * * [ "$(date '+\%a')" == "Tue" ] && echo "Its Tuesday!"
00 07 1 * * [ "$(date '+\%a')" == "Wed" ] && echo "Its Wednesday!"
00 07 1 * * [ "$(date '+\%a')" == "Thu" ] && echo "Its Thursday!"
00 07 1 * * [ "$(date '+\%a')" == "Fri" ] && echo "Its Friday!"
But this morning I got the following error:
/bin/sh: 1: [: Thu: unexpected operator