web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

How to schedule a Macro to run while GP 2010 is running

(0) ShareShare
ReportReport
Posted on by 2,410

I have a macro to login and run check links which works fine.  I would like to setup a Scheduled Task to run a macro though while the user is logged into GP.  There is a server that is always on and running other third parties.  

Whenever I try to run the macro through a batch file with GP open it either opens a new instance of GP and hangs at the login or says it cannot run the file.

Is there a way to do this?

*This post is locked for comments

I have the same question (0)
  • Brian_DiFi Profile Picture
    2,410 on at
    RE: How to schedule a Macro to run while GP 2010 is running

    I did use the ShowXY.exe with System Scheduler to get the X,Y coords for the AutoIt script.  

  • Brian_DiFi Profile Picture
    2,410 on at
    RE: How to schedule a Macro to run while GP 2010 is running

    @Beat I looked at System Scheduler but the end goal was to do this without cost.  

    As mentioned I do have a macro to login and run check links and log the results to a file when GP isn't already running, but with this setup GP is already running all of the time under an active user so we wanted to make use of it.  

  • Brian_DiFi Profile Picture
    2,410 on at
    RE: How to schedule a Macro to run while GP 2010 is running

    This is running on the server where a GP user is always logged in running a 3rd party.  No one uses it or logs into it.  The macros will be for weekly reconciles, check links, etc.  

    I put the macro on the home pages nav bar.  

  • Suggested answer
    Beat Bucher  GP Geek  GPUG All Star Profile Picture
    28,058 Moderator on at
    RE: How to schedule a Macro to run while GP 2010 is running

    Hi Brian,

    I'm running scheduled macros in GP in 3 different companies every week on the server with the help of a free 3-rd party tool (System Scheduler from Splinterware). The trick is that you need to have an active desktop session logged into the server (locked session is OK), because as Leslie mentionned it, GP is a GUI centric application... nothing can be run without the GP interface (unless you use eConnect).

    The trick to run macros with the GP client is to use the auto-login mode of GP if you don't want the user-ID/pwd visible in your macro file (which is clear text). GP stores safely the user pwd in the registry of your system, so don't worry about safety. I personnaly use a batch file (.cmd) to call the GP client start with the macro file name as a parameter.

    Mariano's blog post explains all the details very nicely with screen captures.

  • L Vail Profile Picture
    65,271 on at
    RE: How to schedule a Macro to run while GP 2010 is running

    Hi Brian,

    You may be able to launch the macro, but will it run while someone else is working at the client? I'm sure I'm misunderstanding the question at this point. It's probably a static station, it just has GP already launched.\

    Curiously, is it the QuickLinks section or the shortcut bar that is used to launch the macro?

    Kind regards,

    Leslie

  • Brian_DiFi Profile Picture
    2,410 on at
    RE: How to schedule a Macro to run while GP 2010 is running

    I've got a workaround working using AutoIt, focusing on GP, sending a mouse-click that clicks on the macro on the home page.  

    I've also tested it using Task Scheduler and it's working.  

  • L Vail Profile Picture
    65,271 on at
    RE: How to schedule a Macro to run while GP 2010 is running

    Macros rely on the user interface being in a certain state when you start it. If a user is actually logged in an using the interface, the Macro will fail.

    There used to be a professional services app that would schedule a macro. That was more years ago that I can remember and it's not on the Web anymore.

    If the first think your macro does is login, then I would expect it to try and create a new instance.

  • David V Profile Picture
    270 on at
    RE: How to schedule a Macro to run while GP 2010 is running

    It's trickier than you think.

    You can follow the steps in this KB to log into GP:

    support.microsoft.com/.../855677

    Tweaking this macro, you could append your logic to do something in GP.

    Additionally, Mariano Gomez wrote a blog post tackling this with a different trick:

    dynamicsgpblogster.blogspot.com/.../how-to-schedule-dynamics-gp-to.html

    From my experience, however, Server 2008 on doesn't support "automated desktop interaction" which can throw a wrench in any of the above approaches.

    Either idea is worth a try though - tell everyone how you made out!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans