[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] Problems with cronjob
- Subject: [cobalt-users] Problems with cronjob
- From: Axel Denk <cobaltlist@xxxxxxxx>
- Date: Fri Apr 19 02:52:02 2002
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
Hello,
I tried to install a crontab job for updating a mysql table.
So I wrote a small test.cron located in /etc/cron.daily :
cd /etc/cron.daily
mysql --user=test --pass=test < test_sqlcommand
Also, I wrote a small file called test_sqlcommand, also located in
/etc/cron.daily :
connect testdb
DELETE FROM testProducts;
LOAD DATA LOCAL INFILE
'/home/sites/www.test.de/users/testuser/testproducts.csv'
REPLACE INTO TABLE testProducts FIELDS
TERMINATED BY ';' ENCLOSED BY '\"' ESCAPED BY '\\' LINES TERMINATED BY
'\n'
\g
\q
When I ssh the box and run the test.cron, everything works fine. But
when the machine tries to do the cronjob, I get the following message:
/etc/cron.daily/test.cron: test_sqlcommand: No such file or directory
/etc/cron.daily/test_sqlcommand: connect: command not found
/etc/cron.daily/test_sqlcommand: DELETE: command not found
/etc/cron.daily/test_sqlcommand: LOAD: command not found
/etc/cron.daily/test_sqlcommand: REPLACE: command not found
/etc/cron.daily/test_sqlcommand: TERMINATED: command not found
/etc/cron.daily/test_sqlcommand: g: command not found
/etc/cron.daily/test_sqlcommand: q: command not found
I really don't know what to do anymore. If anyone has any suggestion, I
would really appreciate this.
Thanks for you help,
Axel Denk