Poczytajcie może najpierw o różnicach pomiędzy event, a trigger bardzo bym was oto prosił.
http://blog.adamzawalski.com/trigger-mysql/
http://blog.gabrym.pl/2008/09/01/event-scheduler-cron-w-mysql/
Co na to dokumentacja MySQL:
https://dev.mysql.com/doc/refman/5.5/en/trigger-syntax.html
https://dev.mysql.com/doc/refman/5.7/en/event-scheduler.html
Trigger:
This statement creates a new trigger. A trigger is a named database object that is associated with a table, and that activates when a particular event occurs for the table. The trigger becomes associated with the table named tbl_name, which must refer to a permanent table. You cannot associate a trigger with a TEMPORARY table or a view.
Event:
This statement creates and schedules a new event. The event will not run unless the Event Scheduler is enabled. For information about checking Event Scheduler status and enabling it if necessary, see Section 23.4.2, “Event Scheduler Configuration”.
Dochodzimy do wniosku takiego, że aby samoistnie coś zmieniło się w bazie musisz użyć event'a, takiego jakby cron'a w MySQL lub innej bazie.
Jeśli źle cię zrozumiałem to proszę mnie poprawić.
Co na to Oracle:
https://docs.oracle.com/cd/B28359_01/appdev.111/b28370/triggers.htm#LNPLS020
https://docs.oracle.com/cd/B28359_01/server.111/b28310/scheduse008.htm#ADMIN12445
Trigger:
A trigger is a named PL/SQL unit that is stored in the database and executed (fired) in response to a specified event that occurs in the database.
Event:
An event is a message sent by one application or system process to another to indicate that some action or occurrence has been detected. An event is raised (sent) by one application or process, and consumed (received) by one or more applications or processes.
Moim zdaniem powinieneś użyć event'a, a może nawet musisz, co do tego pewności nie mam ponieważ chcesz użyć bazę danych Oracle.
Co na to ja:
https://forum.pasja-informatyki.pl/249219/gra-przegladarkowa-przyrost-surowcow#a249326
W tym linku jest moja odpowiedź, w której kod samoczynnie zmienia ilość, np. orzechów na inną wartość, co 30 sekund.