Automated report scheduling (autoit - scheduled_tasks)

HuysmansHuysmans Member Posts: 13
I'm working on automating several aspects of Navision system maintenance. The work is progressing nicely. However I'm having serious trouble getting a navision client started using ScheduledTasks.

In the past we have been using the tools from ExpandIt. These are just not flexible enough. So after some research I discovered AutoIt v3. This nice, well documented scripting language enables me to do anything I want.

So I now have several scripts which can be used to control some batch processing. These all work flawlessly when started from within explorer or a command window. However they won't function when initiated from the ScheduledTasks (Microsoft Windows 2000 [Version 5.00.2195]).

Any one, any idea? I've been struggling to find out what goes wrong but the only thing I can detect is that the Navision client will be started but seems to hang shortly after that. Could this be caused by lack of a controlling tty? (still having difficulty to forget my UNIX background :wink:)

Any suggestions to solve this riddle?

Comments

  • PoltergeistPoltergeist Member Posts: 200
    Usually, these problems are can be contributed to not having enough rights to run the tasks. Create a user with the same rights you have (or use your own account name) and use that account to run the scheduled job...

    What you could also use (I use it quite often with AutoIt) is Sanur: it makes it possible to use runas without the need of typing a password. You can download it here: http://www.commandline.co.uk/sanur/
  • HuysmansHuysmans Member Posts: 13
    Thanks for your reply. I will certainly take a good look at sanur. This might just be the right solution for some other batch processing issue.

    However, I am afraid this isn't the cause of the problem. Like stated in previous mail; the scripts run flawlessly when initiated from commandline or explorer. The user-id I use for scheduled-tasks is the exact same as the one I use to login on the machine and run commandline or explorer.
    So as far as I can see, UID's are identical. Further more, the problem is not in getting the navision session up and running but in getting it to terminate after the job is completed.

    Still wondering my head off :x
  • WaldoWaldo Member Posts: 3,412
    May be you can look at using Navision Tools, such as the Navision Application Server, of the (not so stable) Job Scheduler within Navision?

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
Sign In or Register to comment.