Hi Daniel Eriksson,

Thank you for pointing out the limitation on Timer. While we may be able to find some workarounds to solve this problem, I would suggest not to mess up with the Timer.

The easiest way is to schedule the job to run daily, and use an if statement to check the schedule. If the date and time match, then run the job; otherwise, simply return.

Another way is to seek help from Operation Systems to schedule a job in a Console app or via a trigger, e.g., an HTTP request to a web app. Microsoft has solutions like Windows Services (see my article), Task Schedulers. I think other OSs have similar tools as well. Moreover, there are other free software, like Jenkins, can be used to trigger the job to run at specified schedule.

If the application is on Cloud, then there are plenty of solutions too (price varies).

Hope I have answered your question, and thanks again for your comment.

Senior Application Developer. MBA. I write blogs about .NET, Angular, JavaScript/TypeScript, Docker, AWS, DDD, and many others.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store