Solved

Running a Console VB app as a schedule task

Posted on 2008-10-21
9
832 Views
Last Modified: 2010-05-18
I have a console VB application that will run as a scheduled task just fine when scheduled under my account, but fails under any other account.  I tried a dedicated account with Domain Admin rights and it still fails?  Can someone shed some light on what I'm missing.  

Details:  The program just converts some text files to word documents with some formatting of the text prior to converting to .DOC formats....  All in the same folder.

Thanks in advance,

Scott Thomas
0
Comment
Question by:thomashospital
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
9 Comments
 
LVL 32

Expert Comment

by:Daniel Wilson
ID: 22769417
If you log in under that Domain Admin account, does it still fail?

You'll probably need to add some logging to figure out where it's breaking ...
possibilities include:
  • Hitting a mapped drive that isn't mapped for that user
  • Read or write rights on any of the folders
  • read or write rights on any share being hit
  • Rights to run Word (assuming you're using Word for the conversion)
  • Word requiring user setup before it will behave -- the classic "enter your initials, put in the CD, do jumping jacks while I decide whether to work for you"
0
 

Author Comment

by:thomashospital
ID: 22769583
Daniel,

I logged in under the Domain account and it worked!  What does that tell me?  I can't leave the server logged on under that account.

Thanks for the help!!!!
0
 
LVL 32

Expert Comment

by:Daniel Wilson
ID: 22769646
When you run it under Task Scheduler, does it fail to start?  Or break once it is under way?

some information should be available, when looking at c:\windows\tasks ,  under Advanced | View Log
0
Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

 

Author Comment

by:thomashospital
ID: 22776524
The log only shows the task complete with an exit code of (e0434f4d)
0
 
LVL 32

Expert Comment

by:Daniel Wilson
ID: 22776644
OK, that means it did start ... but crashed.

Do you have access to the code to add some logging?  

Otherwise ... is it hitting mapped drives?  those are sometimes quite problematic.

does it pop any message boxes?  In a run-silent scenario those can cause problems ... though they usually result in the thing just waiting, not exiting w/ a funny code.
0
 

Author Comment

by:thomashospital
ID: 22779147
I have the code and can add any logging you would suggest.  Just let me know what you have in mind.
0
 
LVL 32

Accepted Solution

by:
Daniel Wilson earned 250 total points
ID: 22779755
At key places in the code I'd put stuff like:

MyLogFunction "got to the place that does X"

MyLogfunction "got to the place that does Y"

etc.


I'd also put some error-handling in it and have the error-handler log any error it catches.
0

Featured Post

Threat Trends for MSPs to Watch

See the findings.
Despite its humble beginnings, phishing has come a long way since those first crudely constructed emails. Today, phishing sites can appear and disappear in the length of a coffee break, and it takes more than a little know-how to keep your clients secure.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Code planning methods/tools? 5 56
Dell SonicWall Connection 18 57
Protecting Server 2003 against Ransomware 2 79
Linksys EA8500 3 15
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Ransomware continues to grow in reach and sophistication, putting data everywhere at risk. Learn how to avoid being caught in its sinister clutches with these 11 key tips.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question