problem running crontab jobs

B.W. Willems info at enyara.net
Tue May 15 16:23:36 UTC 2007


I have a similar script to backup half my server. I just made a bash
script to run it. But the date script is basically the same, however you
might want to remove the single quotes there:

TIMESTAMP=`date +%m-%d-%y`

Regards.



On Tue, 2007-05-15 at 18:06 +0200, Luca Ferrari wrote:
> Hi all,
> my crontab contains a rude way to backup my eclipse source tree:
> $ crontab -l
> 
> BACKUP_DIR=/mnt/disco4/backup
> DATE=`/bin/date +'%d_%m_%y'`
> 
> 
> ################### 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
> 
> 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