How to continuously monitor a new entry in table in MySQL database and when a new entry being found it triggers a batch file just after that using CRON job. I'm new to MySQL and CRONTAB.
Asked
Active
Viewed 146 times
-3
-
2Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. – jww Aug 16 '18 at 11:06
1 Answers
1
You can use an UDF for this - a mysql plugin that setups a server socket that receives messages from a trigger connected to INSERT, UPDATE, DELETE operations on a specific table in the database. The server will then send a message to a nodejs server that in turn will bounce this notification to any connected http client over a websocket.
There is an example on GitHub - https://github.com/Cyclonecode/mysql-notification

IVO GELOV
- 13,496
- 1
- 17
- 26