Jump to content
Macro Express Forums

Macros don't run - sometimes


das
 Share

Recommended Posts

I've had this happen several times recently with two ways of activating a macro. In each case I can tell that the macro hasn't run because nothing appears in the log file.

 

One macro is scheduled to run at 23.57 every day. It simply calls a batch file. For several days it didn't run at the required time. Then I changed the schedule to make it run about a minute after the change. It ran. I changed the schedule back to 23.57 and now it has run two days running at the correct time.

 

The other macro calls the Suspend script. It is activated by running MeProc.exe as a post-processing command from an Acronis True Image Home 2010 backup job. It was running successfully, but for the last two nights it hasn't run. I can tell from the Acronis log that the command to run MeProc was issued by Acronis, but the Macro Express log, which writes messages to the log file at the start and end of the macro, shows nothing, indicating that MeProc didn't run the macro.

 

Has anyone any ideas about why these macro activations should be so unreliable?

Link to comment
Share on other sites

Most of the problems I've had in the past were due to other applications running and/or updating. That should be way less of a problem with current PCs. You aren't using any windows in the macros so it's not a window interference issue. First thing I would try is to move the scheduled time at least an hour and not near the hour/half hour (when other apps may be updating).

 

One thing I've done in the past is to put in a "backstop" macro until the problem is resolved. The first macro stores a text string (registry, text file etc) when it runs "I RAN". The second (scheduled) macro runs later and checks the string. If it sees the string it aborts and blanks the string in storage. If it does not, it runs the macro and stores an error message somewhere.

Link to comment
Share on other sites

Most of the problems I've had in the past were due to other applications running and/or updating. That should be way less of a problem with current PCs. You aren't using any windows in the macros so it's not a window interference issue. First thing I would try is to move the scheduled time at least an hour and not near the hour/half hour (when other apps may be updating).

 

One thing I've done in the past is to put in a "backstop" macro until the problem is resolved. The first macro stores a text string (registry, text file etc) when it runs "I RAN". The second (scheduled) macro runs later and checks the string. If it sees the string it aborts and blanks the string in storage. If it does not, it runs the macro and stores an error message somewhere.

 

Thanks, I'll give that a try.

Link to comment
Share on other sites

The other macro calls the Suspend script. It is activated by running MeProc.exe as a post-processing command from an Acronis True Image Home 2010 backup job. It was running successfully, but for the last two nights it hasn't run. I can tell from the Acronis log that the command to run MeProc was issued by Acronis, but the Macro Express log, which writes messages to the log file at the start and end of the macro, shows nothing, indicating that MeProc didn't run the macro.Has anyone any ideas about why these macro activations should be so unreliable?

I do something quite similar. I use a download manager called FlashGet, which starts to download at 2:00am. When it has finished, I get it to close itself. But more is happening than Flashget knows about.

 

My computer (Windows 7 Professional X64) is set to sleep after 15 minutes of inactivity. Of course, this meant the computer put itself to sleep at 2:15am, which didn't do a lot for my downloads. So I created a scheduled job (W7 scheduler, not MEP) to run at 1:55am that starts an MEP macro to run a program called Insomnia (only if FlashGet is loaded into memory - which it isn't if I've nothing to download). This tiny utility prevents a computer from sleeping while it is running.

 

Once Flashget closes itself, I have a macro that terminates Insomnia and puts the computer to sleep (activated by Flashget closing). I installed W7 at the end of October, and have had my macros running to close Insomnia since around then. And I can tell you that this arrangement has not failed a single time.

 

I used to run XP Professional, and in that OS I frequently experienced all kinds of problems, notably an inability to sleep or hibernate, and a periodic failure of scheduled tasks for no reason I ever understood.

Link to comment
Share on other sites

Sleep is usually the problem.

...............................................

MEP will not execute if the machine is sleeping. For this it’s best to use the Windows Scheduler (“Task Scheduler” in Vista) because Windows will wake itself for these events. And there are some nice features in the Windows Scheduler as well. And of course you can command MEP to run a macro from here as well.

 

I have not done this much but you can command the scheduler from the command prompt using the NET commands. Click here to see the syntax. This can be handy to create and delete scheduled jobs based on criteria in a macro.

Link to comment
Share on other sites

Sleep is usually the problem.

...............................................

MEP will not execute if the machine is sleeping. For this it's best to use the Windows Scheduler ("Task Scheduler" in Vista) because Windows will wake itself for these events. And there are some nice features in the Windows Scheduler as well. And of course you can command MEP to run a macro from here as well.

If you want Windows to wake itself up in order to run a scheduled task, you must remember to make the relevant setting when creating the task (Settings / Wake the computer to run this task).

In Windows 7, the Task Scheduler has become a much more complex beast!

I have not done this much but you can command the scheduler from the command prompt using the NET commands. Click here to see the syntax. This can be handy to create and delete scheduled jobs based on criteria in a macro.

I think you meant to say "using the AT command"! There's also a command called SchTasks.exe which I tend to prefer (I assume it's available in Vista - an OS I've never had the dubious honour of using).

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...