scheduled task run .exe problem

旧巷老猫 提交于 2019-12-23 03:59:24

问题


I have a c# console app that writes some text to a txt file when runs. I have added it in scheduled task. the task runs without error on a scheduled time... but the console window dose neither pop up nor any text in the destination file!

any idea where is the problem? I'm on windows server 2008 r2.


回答1:


The console does not show because the scheduled task does not run as an interactive user. Text is not written in the dest file because probably it is not accessible by the user running the scehduled task ( maybe is some mounted remote disk ? ). If your c# app is written by your own, try to put some more log to understand what happens.




回答2:


The console does not show if you selected "Run whether user is logged on or not". If you set it "Run only when user is logged on" it will popup and run in interactive mode.



来源:https://stackoverflow.com/questions/6073508/scheduled-task-run-exe-problem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!