run application when log off in c# .net console application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rohitpatel
    New Member
    • Oct 2012
    • 2

    run application when log off in c# .net console application

    i have task scheduling application which execute every 30 minute i want to keep this process when system is log off in c# console application
  • GaryTexmo
    Recognized Expert Top Contributor
    • Jul 2009
    • 1501

    #2
    I may be wrong about this, but I believe all running applications close when the user logs off. You may want to consider writing your application as a service. I'm not sure how you do it off-hand, but if you start your service as SYSTEM, it should run in the background even when nobody is logged on.

    If the reason you want a console application is so you can log output from your task scheduler, consider logging this to a file instead.

    Hope that helps!

    Comment

    • rohitpatel
      New Member
      • Oct 2012
      • 2

      #3
      thanks gary i have used windows service and it works when user log off thank you

      Comment

      Working...