I want to set my log file name into crontab with date - day, not current_date.
I've already success for current date like this:
00 02 * * * bash run_myscript.sh > /logs_myscript_`date "+\%Y\%m\%d"`.log 2>&1 If current date is Feb 19, my log will be logs_myscript_20190219.log but cannot work if I set - 3 day on the crontab:
Actually, I want my log file like this: logs_myscript_20190216.log
00 02 * * * bash run_myscript.sh > /logs_myscript_`date - 3 day "+\%Y\%m\%d"`.log 2>&1