linux - unexpected EOF cronjob error -


i have following cronjob:

2 15 * * * mysqldump -u user -ppass dbname | gzip -9  -c > /var/www/backup/dump-$(date +%y-%m-%d).sql.gz 

but produces following error:

/bin/sh: -c: line 0: unexpected eof while looking matching ')'
/bin/sh: -c: line 1: syntax error: unexpected end of file

i tried ommiting -c no luck. have 1 more line in crontab don't think it's related:

0 0 * * * find /var/www/backup/* -mtime +15 -exec rm {} \; 

thanks

the % character should escaped in cron.

so,

2 15 * * * mysqldump -u user -ppass dbname | gzip -9  -c > /var/www/backup/dump-$(date +\%y-\%m-\%d).sql.gz 

Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -