problem running crontab jobs

nodata lsof at nodata.co.uk
Tue May 15 19:36:39 UTC 2007


Am Dienstag, den 15.05.2007, 18:06 +0200 schrieb Luca Ferrari:
> Hi all,
> my crontab contains a rude way to backup my eclipse source tree:
> $ crontab -l
> 
> BACKUP_DIR=/mnt/disco4/backup
> DATE=`'`
> 
> 
> ################### ECLIPSE #################################
> 00 12  * * * /bin/tar cjvf 
> ${BACKUP_DIR}/sorgenti_java_giorno.tar.bz2 /mnt/disco1/src/java
> 00 17  * * * /bin/tar cjvf 
> ${BACKUP_DIR}/sorgenti_java_sera.tar.bz2  /mnt/disco1/src/java
> 50 17  * * 1,3,5 /bin/tar cjvf 
> ${BACKUP_DIR}/sorgenti_java_${DATE}.bz2  /mnt/disco1/src/java

${BACKUP_DIR}/sorgenti_java_$(/bin/date +'%d_%m_%
y).bz2  /mnt/disco1/src/java

> 
> Now, the first two scripts are working, while the third (the one with the 
> date) is not producing the output. If I run the same line manually, after 
> having exported the BACKUP_DIR and DATE variables, it run correctly. Any idea 
> about that?
> 
> Thanks,
> Luca
> 





More information about the ubuntu-users mailing list