manue
manue

Reputation: 93

crontab no working

I have crontab :

35 16 * * * mysqldump -h mysql2.alwaysdata.com -u user -ppass --all-databases > ../copias/fichero_`date +%d-%m-%Y-%H:%M:%S`.sql

but the command working correctly without crontab. the folder chmod 777 -R.

Thanks.

Upvotes: 0

Views: 186

Answers (2)

ChrisJ
ChrisJ

Reputation: 5261

You should use an absolute path instead of ../copias/fichero....

You don't know what the current directory will be when the command is run by cron.

Upvotes: 4

LtWorf
LtWorf

Reputation: 7608

In the /etc/crontab file you must specify the username as well before the command to run.

Upvotes: 0

Related Questions