Schedule a console application using C #

Let me preface this by saying that I'm pretty green for C # and .NET development in general. In doing so, I would like to schedule a console application to run the code every 24 hours.

I am open to any form of implementation, including timers, schedulers, or even a separate application that will invoke my console application if it is associated with C #.

I know this is an open question, so I appreciate that someone spends time pointing me in the right direction.

+4
source share
4 answers

You can use the Windows Service for this. its better in many ways. You can restart it if it works, and the Windows service will start even if no one logs in. If you still want a console application, you can use the Windows Task Scheduler and it does a pretty good job.

+6
source

This is usually not a program written to plan itself, unless the daemon performs some actions very often. It looks like you want a Windows task scheduler .

+9
source

Check Quartz.NET if you want to control scheduling in a .NET application. Otherwise, you may need to schedule execution using the Windows Task Scheduler .

+2
source

Use quartznet.sourceforge.net Or you can do something like this: http://www.codeproject.com/KB/shell/scheduler.aspx

0
source

Source: https://habr.com/ru/post/1301534/


All Articles