问题
I need a job scheduler to run at regular intervals, for instance every 5 hours. Which job scheduler is a good idea or are there any other techniques to run an event, for e.g. code. Would it require and additional, external software requirements.
My machine has Windows XP and working on the PHP with MySQL.
回答1:
use mysql events
from this
mysql> use test;
Database changed
mysql> create table test.t (s1 timestamp);
Query OK, 0 rows affected (0.11 sec)
14mysql> create event e on schedule every 5 hour do
insert into test.t values (current_timestamp);
Query OK, 1 row affected (0.00 sec)
mysql> set global event_scheduler = 1;
Query OK, 0 rows affected (0.00 sec)
回答2:
SQLyog's Job Agent (SJA) is the powerful tool which includes Scheduling Database Synchronization, Schema Synchronization, Import External Data, Scheduled Back-ups, SQL scheduler & Reporting Tool(to Schedule queries). It is very easy and intuitive to use. You can try it to schedule almost all kinds of MySQL jobs.
Hope it helps and solves your purpose...
来源:https://stackoverflow.com/questions/5700522/what-is-required-to-run-a-job-scheduler-in-mysql