Jump to content

Can't run as scheduled task in Win10 (Grrr) - (Moved)


Recommended Posts

The command I'm trying to run is: 

"C:\Program Files (x86)\AutoIt3\AutoIt3_x64.exe" "C:\arbitraryfolder\script.au3"

If I open up a dos prompt and put that in and hit enter, it runs fine.  If I make a scheduled task in win10 pro where I put that in as the action, I can't get it to run when I right-click the task and select "Run".  I've tried taking the second part and putting that in as the argument.  No difference.  The little auto-it icon doesn't even show up in the lower right.

The task is set to run as me (an administrator).  I had the same task setup in my old operating system (XP) but win10 isn't playing ball.  Any other gotchas anyone know about with Windows 10?

Link to comment
Share on other sites

  • Developers

So it does run making the title pretty misleading. ;) 

Guess the next thing to check is the script. What is it doing?

Jos

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

4 minutes ago, gizmosmith said:

The task status changes to "Running" and stays that way.  I eventually right-click it and end the task manually.  Autoit icon never shows up in lower right, script never runs.  Very odd.

Playing around some more the status doesn't even change, it just stays at "Ready" and the last operation completed "successfully"

Link to comment
Share on other sites

2 minutes ago, gizmosmith said:

Playing around some more the status doesn't even change, it just stays at "Ready" and the last operation completed "successfully"

Well, if I compile the script to an exe, I can just make the task point at it and it runs.  This seems to work because I don't have to use any arguments this way.  I'd rather run the .au3 file directly since I tend to tweak it every now and then and now I have to remember to compile it each change.

Link to comment
Share on other sites

10 minutes ago, Jos said:

So it does run making the title pretty misleading. ;) 

Guess the next thing to check is the script. What is it doing?

Jos

Well, it says it's running but the autoit icon is not in the lower right and I can see the script is not doing its steps.  I'd say it isn't running.

Link to comment
Share on other sites

  • Developers
7 minutes ago, gizmosmith said:

I'd say it isn't running.

Why? I would say it is running and waiting for something ....hence my second question:

18 minutes ago, Jos said:

Guess the next thing to check is the script. What is it doing?

... and the answer to this question is ...What?

Jos

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

1 minute ago, Jos said:

Why? I would say it is running and waiting for something ....hence my second question:

... and the answer to this question is ...What?

Jos

The script is doing nothing.  It's not running.  That's the problem.

Link to comment
Share on other sites

15 minutes ago, gizmosmith said:

I'd rather run the .au3 file directly

I think this is where your problem lies, are you running AutoIt3.exe with the path of your .au3 file as a parameter in the scheduled task?

Okay... I just had a dumb moment and didn't see your command in the first post.

Edited by TheDcoder

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

  • Developers
5 minutes ago, gizmosmith said:

The script is doing nothing.  It's not running.  That's the problem.

With that question I mean: What is the script supposed to do! 
Show some code if you can. 

Edited by Jos

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

6 minutes ago, Jos said:

With that question I mean: What is the script supposed to do! 
Show some code if you can. 

Ah.  The script is supposed to bring my accounting software into focus and get it to export some data in xml format.  It then runs a ruby script I wrote that parses that data and makes some html files from it.  When the autoit script runs, I see all this activity happen.  When it doesn't run, well, nothing happens.  The code looks pretty boring but I'll post it if you'd like.  It's pretty clear if it's running or not and I figured that's the point.

Link to comment
Share on other sites

  • Developers

I am sorry, but it feels a little like pulling teeth here. You seem to be convinced you are right but still posted this thread for help, but act you aren't open to any suggestion made. :)

I have already stated: 

19 minutes ago, Jos said:

Why? I would say it is running and waiting for something ....hence my second question:

... so have you checked that?  else please show the code so we can check to see if there is any blocking function in there that might cause this.

Jos

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

3 minutes ago, Jos said:

I am sorry, but it feels a little like pulling teeth here. You seem to be convinced you are right but still posted this thread for help, but act you aren't open to any suggestion made. :)

I have already stated: 

... so have you checked that?  else please show the code so we can check to see if there is any blocking function in there that might cause this.

Jos

Sorry about the negative vibe if that's how it's coming across.  Here's the script. 

script.au3

Link to comment
Share on other sites

If the scheduled task is set to run whether you are logged on or not, then if for any reason your msgbox functions are being executed, the script will appear to hang because it is waiting for a response which it can NEVER receive.  If the scheduled task is set to only run when logged in, then it may work.  So If you are going to run your script as a scheduled task whether you are logged on or not, then you should make sure that your msgbox functions never execute or better yet, just replace them with something that is not interactive, like a consolewrite (if they are just informational).

If you open the Task Manager and see one or more of you processes just sitting there, then it's a good bet they are sitting there waiting for one of your message boxes to be dismissed.

Edited by TheXman
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...