I'm basically trying to declare a variable with a date() value in crontab as I will constantly be using the same date structure over and over, here is what my crontab looks like so far.
php = '/usr/bin/php'
dir = '/var/www/bkd'
logs = '/var/www/bkd/logs'
#10 23 * * * $php $dir/inventory/delete.php >> $logs/delete/delete_$(/bin/date +\%Y\%m\%d\%H\%M\%S).txt
31 00 * * 7 $php $dir/prices/all.php >> $logs/prices_all/prices_all_$(/bin/date +\%Y\%m\%d\%H\%M\%S).txt
#30 21 * * 3 $php $dir/ranks/all.php >> $logs/ranks/ranks_all_$(/bin/date +\%Y\%m\%d\%H\%M\%S).txt
But I would prefer to have something like this... where the time variable is being used at the end
php = '/usr/bin/php'
dir = '/var/www/bkd'
logs = '/var/www/bkd/logs'
time = $(/bin/date +\%Y\%m\%d\%H\%M\%S).txt
#10 23 * * * $php $dir/inventory/delete.php >> $logs/delete/delete_$time
31 00 * * 7 $php $dir/prices/all.php >> $logs/prices_all/prices_all_$time
#30 21 * * 3 $php $dir/ranks/all.php >> $logs/ranks/ranks_all_$time
Is there anyway something like this could be possible in crontab? thank you in advanced