Jump to content
Macro Express Forums

Reliability of scheduled macros?


Recommended Posts

I had problems with unreliability of scheduled macros some years ago and have since avoided that activation type wherever possible,

The only such macro I do have left is proving decidedly unreliable. It simply saves a file from a particular application (Google Earth) every 10 minutes to a fixed folder, with a number suffix. Roughly 25% of occasions it fails to run. I know this because the green man remains dsiplayed in my Win 10 taskbar and on checking the folder I see that longer than 10 mins has elapsed since the last save. Sometimes much longer if I don't spot the icon and then close it, allowing the macro to continue. Until it hangs again.

Are others' scheduled macros reliable?

Terry, East Grinstead, UK

 

Link to comment
Share on other sites

Thanks Cory. What is your typical 'executable'? A program or VBS etc you've coded yourself to perform a customised task at set intervals?

Prompted by that, maybe I'll try exporting my macro as an MXE and use that as my executable. Ideally I'd like MX Pro to do the activation reliably as well though.

P.S. By coincidence, I broke off to read your post while working on the video of my last trip to USA, just finishing a  GE path of a 1,300 mile trip ending at Carlsbad, maybe 30 miles south of your location?

Terry, East Grinstead, UK

 

Link to comment
Share on other sites

I’m confused.  You say the macro “fails to run”.  Do you mean that the macro fails to start; or that it starts but fails to accomplish the intended file save?  Those are two very different issues.  I have found scheduled macros start reliably.  

All my macros have this as the first line:
Log Message to Default Error Log
where the “message” logged is the macro name.  So it is very easy to look back on the ME log and see every time it starts.  You could easily embed additional log messages at critical points in your macro to see how far it gets before hanging, if that is what is happening.  

 

Link to comment
Share on other sites

Thanks, I should have said "run properly" or "run fully". It starts, as shown by the presence of the running man, but does not finish.

I'll investigate the log for further clues. Do you find that tool better for isolating problems than interposing Pause and/or Macro Stop commands?

Instead of entering that command for each macro, wouldn't it be easier to enable Log all Commands (and maybe Log all Errors)  under the Script Editor's Miscellaneous tab, which I'm belatedly considering doing?

Is there any significant performance impact when using these debugging tools?

Terry, East Grinstead, UK

Link to comment
Share on other sites

After further testing further I'm now almost certain it's down to my macro, not any inherent unreliability in MX Pro.

The macro is not coping properly with complex situations. Such as my doing other work in GE during its duration (2-3 secs). I've duly added a Lock Keyboard and Mouse at the start.

I'm considering also adding Lock Player: Wait for running macros to stop' (with the option Wait for all running macros to complete before continuing also enabled). I use a lot of macros with GE and potential conflict obviously complicates matters.

To avoid both sorts of issue I did at one stage abandon scheduled activation and instead do it manually every once in a while. Downside is that I would get absorbed and forget - usually at a bad time!

Terry, East Grinstead, UK

Link to comment
Share on other sites

8 hours ago, terrypin said:

Do you find that tool better for isolating problems than interposing Pause and/or Macro Stop commands?

Instead of entering that command for each macro, wouldn't it be easier to enable Log all Commands (and maybe Log all Errors)  under the Script Editor's Miscellaneous tab, which I'm belatedly considering doing?

Is there any significant performance impact when using these debugging tools?

Terry, East Grinstead, UK

With complex macros I have built in many logging commands for debugging, but usually have a switch I can turn on or off so the logging is bypassed under normal situations -- just turn it on when I am having a problem.  I have never used Log All Commands -- seems like it would be useful in some cases, but extremely time-consuming to read through the trace looking for a problem.  For a macro that runs really long or really frequently, I would fear the performance impact.  For one that runs only once in ten minutes, like you describe, minimal impact to write a few or a few hundred lines to the text log file.  Note I only recommended that, as a start, you scatter some log commands through the macro to isolate the general area where it is hanging up. 

Sounds like you have made a good beginning by determining that the problem is not with the scheduling component of ME. 

Link to comment
Share on other sites

According to GE the closest part of Carlsbad is 13.3 miles from my house as the crow flies. 

For extant macros I would use MeProc.exe as the executable. It checks if MEP is running and if it is, pass the command to the running process and if it isn't, it will launch MEP and run the macro. It's quicker if MEP is running. For the parameters I use "/A <MacroName>". Look in the Command Line Parameters section of the help file for instructions and examples.

Link to comment
Share on other sites

I forgot to mention. Since I've learned .NET I have replaced all my scheduled macros that preform background maintenance tasks. They're so simple to create and much more reliable. If you ever need something simple, let me know and I can program something for you. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...