Page 1 of 1

A cron job question...

Posted: Tue Dec 28, 2004 9:52 pm
by HormonX
Can any one tell me if it is possible to run a MySQL query within a cron job command ?

If it is possible .. can you tell me how ?

Just to let you know am using a cron manager within CPanel 9

Greg

Posted: Wed Dec 29, 2004 5:53 pm
by kettle_drum
Sure it is, you can run pretty much anything, just have the command as something like:

Code: Select all

mysql -u bob -password=blah mydatabase < "UPDATE table SET rah = '4' WHERE id = '1';"
Or you could have it read the SQL queries from a text file. Just have a play about and see what works.

yes you can

Posted: Thu Jan 20, 2005 12:00 am
by kgourad
Yes you can do that with a cron job. Here is a good webpage to help

Khalid Gourad