0

I want to execute the program when datetime column set in mysql comes to current time. Is there a useful way to do that?

Thanks.

kinakomochi
  • 475
  • 4
  • 8
  • 14

1 Answers1

2

use a cronjob for runnng the program on the desired time. Write a program in php or any language , which deals with interaction with the database. then make that program file to run as a cronjob at specific time intervals

user7282
  • 5,106
  • 9
  • 41
  • 72
  • I see. Actually desired time is refreshed frequently. So I'm looking for more smart way other than cronjob. – kinakomochi Dec 11 '12 at 05:47
  • you can add the code to update the desired time on that cronjob program. also check http://stackoverflow.com/questions/6560639/how-to-schedule-a-stored-procedure-in-mysql – user7282 Dec 11 '12 at 05:50
  • Cron is useful to run the script on the desired time, but this is out-of-DB-session. MySQL event can't handle the script other than sql. I want to use both of them(scripts and mysql), so is there any way to merge them? – kinakomochi Dec 11 '12 at 07:11
  • You write a program in php or any language , which deals with interaction with the database. then make that program file to run as a cronjob at specific time intervals – user7282 Dec 11 '12 at 07:21