Timers Programming Help


PM me for any queries in digitForum!
Hi Programmers of TDF

Need your help in Programming.

Windows Service or Console Application
Functionality: Implementation using System.Timers or System.Threading.Timers
Description: Design a windows service/console which has a Main method (ignore logic inside).
The service will run everyday (obviously its a windows service), but the main method logic should trigger only a specified time (not interval).
For e.g: If the time is set to 10AM & 3PM then only at that time occurrence the event should trigger.
The time to be fired will be taken from configuration settings.

Just post the code snippet (C#/Java or PHP) for the implementation.

Note: The code should fire only at the specified time so if the user input is 10AM, 3PM, 4PM then exactly at that interval it must execute. And then the next day again same thing should happen.

I know using the interval option of timer can do the job but the gap will be even in that case (i.e interval of 2hrs or 3hrs) which I don't want.



I know I am pretty late here.. Just search for Hangfire in dotnet or dotnet core. You can provide a cron expression and you can expose your services in UI to fire it again and again, or just for monitoring and logging.


PM me for any queries in digitForum!
Thanks, used cron trigger long back.
will check hangfire