c# - How to make exe run as scheduled task -
i created winform project in c# , added code file called loader.cs. in file have method called loaddata(). deleted default "form1" project changed logic in main() run loaddata() method. works when run in vs2008 ide. built release , moved resulting .exe different machine , set scheduled task trigger every hour , action pointing .exe /auto argument. task nothing, sits running , not doing of processing. have end task. same if run manually. if double click exe folder it's located nothing. how can exe run scheduled task or run independently?
in program.cs:
static class program { [stathread] static void main() { loader lc = new loader(); lc.loaddata(); } }
and in loader.cs file:
public void loaddata() { // ...processing }
i try putting try { } catch { } in main , examining exception.
Comments
Post a Comment