0

i try to work with crontab -e into ssh at centos 6 i can't work with variable into crontab -e i try many times to get it to work but i failed to run with it

MYDATE=`date`


*/1 * * * * /usr/bin/curl --head -sf http://localhost/php.php?date=$MYDATE -o /dev/null || /restart.sh

i can't work with variable into crontab -e i try many times to get it to work but i failed to run with it

i need date into url to make refresh url every time because i use high cache i need to test url every time with new one

there any way to run it every minute

4

1 回答 1

0
* * * * * SUFFIX=`date +\%M`; cp /home/temp.php /home/temp3_${SUFFIX}.php >/dev/null
于 2013-10-03T02:44:37.587 回答