I am trying to use cron on my debian11 VM to create a folder with todays date on system reboot if it does not already exist, this is the line I have used.
@reboot /usr/bin/mkdir -p /home/bin/data/"$(date '+%Y%m%d')"
This work from the terminal, and after looking online I understand the issue is that cron is not ran like a shell, and that I could solve this problem by packaging this line inside a .sh file. I'm ok with this solution but in the interest of simplicity and learning, how would I rewrite this line so it would run from cron successfully?