Writing a plugin that does something periodically
Hi all!
I want to create a plugin that sends heart-beat signals with current project build status via local network. If I wanted to send these signals only on state change I could implement jetbrains.buildServer.notification.Notificator but I need to send them every X seconds. So I need to implement something that could be triggered from time to time. Can anybody help me and tell what should I start with?
Thanks.
Please sign in to leave a comment.
For this you need to create a class asking for java.util.concurrent.ScheduledExecutorService in constructor. The class should be defined as Spring bean in teamcity-plugin-*.xml file. Then you can add your task to this executor service.
Thanks, Pavel. I will try this soon.