Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

Isn't there a better way to get an automated task set up to run on a terminal server 2003 and 2008??

Posted on by 175

Hi.

I am so fed up with Windows Scheduled Tasks running Macros to run, for instance, Inventory Reconcile as a nightly job in GP2010. The process is so temperamental. Isn't there a better way to get an automated task set up to run on a terminal server 2003 and 2008?? Can SQL not do something similar??

I'll be most grateful for any suggestions. Happy 2012 to all!!

Neil

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Isn't there a better way to get an automated task set up to run on a terminal server 2003 and 2008??

    Look into a product called Visual Cron:

    www.visualcron.com/Home.aspx has free trial period...will do almost anything you need.

  • Robyn Profile Picture
    Robyn 1,745 on at
    Re: Isn't there a better way to get an automated task set up to run on a terminal server 2003 and 2008??

    I am having same issues?  Have you found any resolution?

  • Neil Lombard Profile Picture
    Neil Lombard 175 on at
    Re: Isn't there a better way to get an automated task set up to run on a terminal server 2003 and 2008??

    Dear Leslie

    Below is an example of the batch file that have set up:

    echo %USERNAME% %DATE%%TIME% >> "C:\Program Files\Microsoft Dynamics\GP2010\macro.log"

    "C:\Program Files (x86)\Microsoft Dynamics\GP2010\Dynamics.exe" Dynamicsmaintenance.set reconcile.mac "C:\Program Files (x86)\Microsoft Dynamics\GP2010\Data\DEXmaintenance.ini"

    echo %errorlevel% >> "C:\Program Files\Microsoft Dynamics\GP2010\macro.log"

    I get something weird on this particular server. When I am logged in and I set off the batch file manually, I can see the cmd window opened, GP opened and logged in as the user that I specified in the macro, the process run and completed, the user loggng out, GP closed and the cmd window close. I go and check the txt file and verify that the IV reconcile process ran successfully. I can with confidence say that the batch file works and the macro works.

    I then set up the windows scheduled task to run. I set it to run from 2 minutes ahead and I watch the screen. I follow the process as described above and I am confident that the process runs successfully. I have the checkbox unticked that specifies "run only when logged in".

    I then set the time 2 minutes ahead again and this time I log out of the terminal server. I wait for the task to complete, I log back in to the TS and I see that the task is still running and nothing has happened as expected.I have another server that runs the exact same process but on another company in GP and on that server it works perfectly while logged out or while logged in.

    When I let the task run and just disconnect from the server instead of logging out, then when I log back into the TS i see that the macro fell over on the password field - and this does not happen when the task is set off and running while logged in.

    I get 3 different outcomes. Why is that??? And only for this particular TS. On the other servers it works fine???

    I am desperate to find a working solution for my client.

    Neil

  • Neil Lombard Profile Picture
    Neil Lombard 175 on at
    Re: Isn't there a better way to get an automated task set up to run on a terminal server 2003 and 2008??

    I was wondering if I could run the batch file as a SQL job?

    I have not done this before but I was wondering whether it would work, if I had to set up a SQL job, would SQL be able to launch the batch file that runs the GP macro (running Inventory Reconcile) and execute dynamics.exe??  

    What would be the syntax that I would use or what would be the detailed setup of this job?

    Has anyone been able to do this successfully?

    I would be forever grateful for a solution.

    Neil

  • Neil Lombard Profile Picture
    Neil Lombard 175 on at
    Re: Isn't there a better way to get an automated task set up to run on a terminal server 2003 and 2008??

    Hi Leslie

    I have a macro set up that works perfectly. I have a batch file that launches the macro successfully. I have a windows scheduled task set up that runs very inconsistent on a Windows 2003 server with GP2010 and SQL Server 2005. This is set up on a client's servers. They have 3 terminal servers set up to run 3 concurrent GP2010 installs and the SQL server seperately.

    I run the scheduled tasks for a particular company on a server thus 3 companies on 3 servers all connected to the SQL server.

    I monitor and keep a log of the IV Reconcile jobs as running via the batch file every day and all 3 servers run very inconsistantly. I have to stagger the start up times of the 3 jobs on the 3 servers as I have found that for some inexplicable reason the one affects the running of the other. This seems bizarre as the servers are independant so it may be a SQL issue??

    The report on the running of these tasks indicate inconsistancy of running successfully. It would for example run for a month without hassles and then without visible reason the job would stop to work and then it would take weeks to get it running again. Sometimes I have found that the macro becomes corrupted and I have to re-record the macro and then it works again. This is what I have referred to as temperamental.

    Can these jobs not run in SQL of from SQL???

    I have another client running GP2010 on Windows Server 2008 R2, SQL Server 2008 R2. This is a bit of a different story as they are very security concious and the IT manager restricts our access to their servers which prevents us from conducting tests. We have been trying to get the windows scheduled task to run for 6 months now and it has yet to run successfully. I have a macro set up that works perfectly running IV Recooncile. I also have a batch file that launches the macro perfectly when you run the batch file manually by double clicking on it. However the windows schedulre does not launch the batch file. Now this may be a security issue however we got the client to set up the windows scheduled task to run as administrator and still the task does not launch the batch file. The only time we have to conduct testing is during office hours when of course reconcile will not run as tranactions are being processed but we have a workaround by running the reconcile on a single item just to be able to test the macro and the batch file.

    We are sitting with our hands in our hair and cannot come up with a soilution together with an IT manager that will not give us security access to run tests - by the way, the IT manager is clueless on running this task and it is not like the manager can do it themself.

    We would love to offer this service to our clients so I'd love to hear from someone who has this process waxed.

    Most appreciatively yours

    Neil

  • L Vail Profile Picture
    L Vail 65,271 on at
    Re: Isn't there a better way to get an automated task set up to run on a terminal server 2003 and 2008??

    Hi Neil,

    This is going to be a silly question, but what problems are you running into that causes you to conclude the process is so temperamental.  I don't doubt that it is, but I would like to hear a little bit more about what you are trying to accomplish. Do you have a .bat file that logs in to GP and fires off a macro to run the IV reconcile? If yes, are you including the macro in your launch?  It would look something like this:

    "Dynamics.exe" "dynamics.set" "Macro.mac"

    Of course you would have the whole path to the files.

    I feel confident this forum can come up with a couple of ideas for you. So, more information please.

    Kind regards,

    Leslie

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans