Windows Service or Scheduled Task, which one do we prefer?

后端 未结 10 1819
时光取名叫无心
时光取名叫无心 2020-12-16 12:07

If we need to write a program that works periodically, which way do we prefer? Writing a windows service or writing a console application which works as scheduled task?

10条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-16 12:50

    I would think it would also depend on if you can leave the computer logged in or not. I've found that a Windows Scheduled Task cannot run unless the person that set up the task is logged in. If the computer cannot stay logged into, the program must be run as a service vice Scheduled Task.

提交回复
热议问题