[Ilugc] please help me - crontab problem

  • From: indianathann@xxxxxxxxx (padhu)
  • Date: Wed, 22 May 2013 21:25:23 +0530


I'm running Ubuntu 12.04 (32-bit) and have the following script in crontab

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

40 13 * * * root mysqldump -u root -pxxxxxxxx Database | gzip >
/back-up/DB_name_`date '+%d-%m-%Y'`.sql.gz
00 1 * * 0 root mysql -u root -pxxxxxxxx -e 'ANALYZE TABLE
tbl_name;' DB_name
10 1 * * 0 root mysql -u root -pxxxxxxxx -e 'OPTIMIZE TABLE
tbl_name;' DB_name
20 1 * * 0 root mysql -u root -pxxxxxxxx -e 'CHECK TABLE tbl_name;'
DB_name



What am I doing wrong? it's not work !!


------------------------------

Best way of crontab edit is

$ sudo crontab -e

please verify your default editor before run this command.

Your entry will be made in crontab, if it is right.

If you are going to add script, then test it before adding to crontab.


Other related posts: