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?
It depends on what you mean with periodically? Each second, Each minute, each hour, each day?
I would say the more frequent a task is to be running, the more a Windows Service is preferred.