Jump to content

Complied Script Hangs When Run As A Scheduled Task


Recommended Posts

We have two vendor application pgms that are intended to be executed interactively (via GUIs).

We're trying to use AutoIT to script the 'user interactions' and be able to effectively run each of these apps as though they were 'batch pgms'.

I had success building AutoIT scripts that would launch and interact appropriately to run these applications.

I even tested the scripts operating as an AutoIT-compiled executable and that seemed to work as well.

However, the next step was to test launching the script 'executable' as a scheduled task on our Win2003 server.

If I am logged on at the time that the script launches, I can 'watch' it execute through completion.

But, if I'm not logged in when the script launches, the GUI-based programs launch but then hang.

Has anyone else had issues like this with running AutoIT scripts as a 'scheduled task'?

If so, what did you need to do to make it work correctly?

Or does anyone even have any sugesstions as to how I should proceed in my investigations?

Link to comment
Share on other sites

We have two vendor application pgms that are intended to be executed interactively (via GUIs).

We're trying to use AutoIT to script the 'user interactions' and be able to effectively run each of these apps as though they were 'batch pgms'.

I had success building AutoIT scripts that would launch and interact appropriately to run these applications.

I even tested the scripts operating as an AutoIT-compiled executable and that seemed to work as well.

However, the next step was to test launching the script 'executable' as a scheduled task on our Win2003 server.

If I am logged on at the time that the script launches, I can 'watch' it execute through completion.

But, if I'm not logged in when the script launches, the GUI-based programs launch but then hang.

Has anyone else had issues like this with running AutoIT scripts as a 'scheduled task'?

If so, what did you need to do to make it work correctly?

Or does anyone even have any sugesstions as to how I should proceed in my investigations?

Are you running with User account? If you run the program with SYSTEM account, it's whole different world.

You can not use UNC path or RunAS function.

Link to comment
Share on other sites

This issue has been coming up somewhat frequently and should be added to the FAQ:

Anyway, take a look at these for info:

http://www.autoitscript.com/forum/index.php?showtopic=18026

http://www.autoitscript.com/forum/index.ph...ndpost&p=110409

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

This issue has been coming up somewhat frequently and should be added to the FAQ:

Anyway, take a look at these for info:

http://www.autoitscript.com/forum/index.php?showtopic=18026

http://www.autoitscript.com/forum/index.ph...ndpost&p=110409

18026 suggests that none of AutoIt's Win...() functions can ever operate as part of a AutoIt script set to execute as a Scheduled Task. Is that correct?

What's your opinions about trying to use the domain admin account when executing the Scheduled Task?

How could this approach be any different if Win...() functions are involved?

Link to comment
Share on other sites

  • Developers

18026 suggests that none of AutoIt's Win...() functions can ever operate as part of a AutoIt script set to execute as a Scheduled Task. Is that correct?

The key is whether the scheduled task can interact with the desktop. To the able to, it need the desktop session to be active and not locked ...

What's your opinions about trying to use the domain admin account when executing the Scheduled Task?

How could this approach be any different if Win...() functions are involved?

Do see a why being a domain admin would help in this case. As long as the userid that is used to schedule the task has enough rights to perform the task of the script.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

If you are new to AutoIT and would like to get the basics down quicker, check out this awesome new coaching tool...

And if you find it useful ...vote :)

http://www.autoitscript.com/forum/index.php?showtopic=24117

~Projects~1. iPod Ejector 1.0 - Tool Used To Eject iPod in Windows - Uses DevEject.exe :P2. SmartFTP Close Popup Tool - Closes reminders from freeware SmartFTP.~Helpful Links For New Users~1. LXP's Learning AutoIT PDF Guide - <<< Go here for a PDF Guide on learning AutoIT from the ground up!<<<2. AutoIt 1-2-3 <<<Want to learn more about AutoIT quickly? Go Here<<<3. How To Install The Beta And Production Versions Of AutoIT / SciteAutoIT

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...