MySQL has a Event Scheduler that would allow you to emulate what you describe. I do not know the granularity with which you can define events in Sybase, but as you go along tuning you could achieve more or less the same.
The creation of an event has the syntax:
CREATE EVENT myevent
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR
DO
UPDATE myschema.mytable SET mycol = mycol + 1;
Now, you want an event that happens every 10 minutes, but only between two specific hours. One way could be:
DELIMITER //
CREATE EVENT my_event ON SCHEDULE EVERY 10 MINUTE DO
IF CURRENT_TIME BETWEEN '07:00:00' AND '19:00:00' THEN
UPDATE myschema.mytable SET mycol = mycol + 1;
END IF//
DELIMITER ;
You could also play with the START and ENDS clauses, but you should be testing, because the ENDS clause could be interpreted as having fulfilled that term the event stops running.
You have to check that the scheduler is enabled in your MySQL installation. If you put
SET GLOBAL event_scheduler = ON;
will be enabled, but if the initial configuration is disabled, that setting will be lost when you restart the service. You have to make sure that event_scheduler=ON
appears in your configuration file so that it is always enabled.
In services where you do not have access to the service configuration, like Amazon RDS, you have to play with the parameters of the instance, as described here .