Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trigger set on time?

Status
Not open for further replies.

tsp120

Programmer
May 21, 2003
52
US
I'm planning a website right now. At a specific time each day (let's just say noon for example), I want to run a couple scripts on the database. From all the research I've done, it doesn't appear that you can set a trigger up to do this.

So my question is, what would be the best way to get this functionality? The only idea I've come up with, is that everytime a user signs in, the system checks if it's past that time, and if the scripts have been run. If it is past that time and the scripts have not yet been run, then the scripts get executed when the user signs in.

I'm sure this would work, however it seems like terrible database design.

I know I haven't provided a lot of info, but I'm in the planning stages right now and I don't have much info to give.
 
I've never heard of cron. I just looked it up, and it seems to be exactly what I'm looking for. Thanks!
 
if you never heard of cron chances are you are running MySQL on windoz.

If so, CRON is only found on linux. A poorer alternative on windoz would be task scheduler but I do not think it would run batch scipts complex enough to allow you to interact with mysql.

You can however run a mysqldump command, as it is executed entirely in dos.

Cheers

QatQat

Life is what happens when you are making other plans.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top