Search code examples
c#windows-10scheduled-tasksminimized

Run Scheduled Task Minimized


I have setup a console app to run every minute using Windows scheduler. However, a CMD screen pops-up briefly when the scheduled task runs. This is kind of annoying and I would like the task to start up while minimized and then close.

Looking into existing resources, I have tried:

1) "Run whether user is logged on or not": nothing happens, I do not see any entry in the file which should happen if the execution was successful.

2) Create a Shortcut from the .exe and make the shortcut run minimized: The shortcut is converted to actual app and it runs maximized.


Solution

  • If you compile the Console Application as a Windows Application it'll hide the cmd window all together.

    If using Visual Studio, right click the project -> Properties -> Application -> Output type: -> Windows Application