Hi @mohd mazhar khan,
I found a document that might do what you want.
This tutorial demonstrates how to create a Windows service app in Visual Studio that writes messages to the event log, including how to implement a timer component.
Tutorial: Create a Windows service app - GitHub
Some other useful links:
https://stackoverflow.com/a/41682223
https://stackoverflow.com/a/12886071
Best regards,
Lan Huang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.