Gossamer Forum
Home : General : Databases and SQL :

Run a MySQL statement via cron

Quote Reply
Run a MySQL statement via cron
Hi:

I have a colo server, but my ISP hosts my MySQL... so I do not know mysql too very well at all.

I have a cron job I would like performed on my MySQL data once a month. OK, I can setup the cron just fine, I am just not sure HOW I would send the mysql statement. I know what I would send in the MySQL command boq inMySQLMan... I would send:

update Links set mon_hit = '0'

(I keep my hits tracking cumulative in Links, but I also run a monthly "Most Hits"...- I just want to reset that, and I often forget.)

so the MySQL server is at usersql.aros.net, username dave password links...

Would I want to run a quick perl script, or can I run a command linke in crom to do this? And- this is the biggy!- how would I write the statement?

TIA!
dave

Big Cartoon DataBase
Big Comic Book DataBase
Subject Author Views Date
Thread Run a MySQL statement via cron carfac 5965 Jul 15, 2003, 8:29 PM
Thread Re: [carfac] Run a MySQL statement via cron
Stealth 5862 Jul 15, 2003, 9:16 PM
Post Re: [Stealth] Run a MySQL statement via cron
carfac 5779 Jul 16, 2003, 8:07 AM