How to automatically restart a program that is suddenly locked into high cpu usage

From time to time Windows programs can misbehave in a variety of ways. They may exit silently or suffer an in-your-face crash, they may suddenly become unresponsive, or they may get locked into a state where they’re consuming ridiculously high cpu without actually doing what they’re supposed to. In the absence of a newer bug-fixed version of the program in question, usually the only remedy for these problems is to terminate the program in question (if it’s still running) then relaunch it. That’s fine – if irritating – in cases where someone’s on hand to nursemaid the unstable program, but in cases where the computer has to work unattended it can mean hours of disrupted service and lost work. Fortunately PTFB Pro is able to help with all of the above failures.

In the case of silent exits / crashes, use a ProgMon (program monitor) macro item to automatically relaunch the program or process any time it is found not to be running, and use PTFB Pro’s regular Single Press or Macro items to dismiss the associated Windows messages (e.g. “X program has stopped working”). For unresponsive or pathological high cpu usage cases, use a single ProgMon macro as described below.

  1. Create a new ProgMon macro.  There numerous ways to do this, e.g. click on New Macro then choose ProgMon Macro, associate a hotkey with the New ProgMon macro function and use that etc.
  2. A wizard will now guide you through configuration of the new macro. The first task is to indicate which program to keep an eye on. The wizard shows you a list of all the currently running processes. If the target program is in the list, just select it (failing that you can still enter its details directly).
  3. The next page of the wizard lets you specify what actions to perform on the program or process, and when to carry them out:RestartHiCPU
  4. If you want to restart the program when it becomes locked into high cpu usage, select the “Restart the program only if it is misbehaving” and tick the “Exceeds cpu utilization” box, and optionally the “Not Responding” box too.

    You can now set the maximum cpu usage that will be tolerated. A good rule of thumb here is to pick a value slightly below the cpu usage shown in Task Manager when the program is misbehaving.

    You may also notice that you can configure the time period in minutes between each check on the program’s status, and set the number of consecutive “bad states” that must be seen before the program is restarted. Together these two values help set the tolerance for the symptoms of the misbehaving program; if it legitimately exhibits high cpu or becomes unresponsive for a brief periods then recovers, set a less frequent check period and require more than one consecutive bad states, and PTFB Pro will only take action when the program has truly entered an unrecoverable state of ill-health.

  5. The rest of the wizard deals with how to terminate the program and how to relaunch it. Unless you have specific requirements here, you can just take the defaults.

Once you’ve configured the new ProgMon item to your satisfaction, just hit “Start Watching” on PTFB Pro’s main screen to start monitoring and as/when necessary restart the target program.

Find out more about boosting your productivity with PTFB Pro.
CLICK HERE to download a free 30 day trial, no strings attached. If you aren’t entirely happy simply uninstall!

How to automatically restart a program when it becomes unresponsive

There’s a critical program on your system that has known memory leaks. It needs to be restarted on a regular basis to free up resources.

Another critical program occasionally hangs or goes into the ‘not responding’ state. It needs to be restarted quickly when this happens – even during the night when there’s no one on the premises.

How to do it …

  1. Open up PTFB Pro’s main window by clicking on its tray icon
  2. Click on “New Macro…” and choose “ProgMon Macro”
  3. Select the program in the resulting list and hit Next
  4. Choose “Restart the program ONLY if it is not responding” and set the frequency of the check (make this as long as you’re comfortable with). Hit Next
  5. The next page deals with how the program will be terminated when it has become unresponsive. By default, PTFB Pro choose “Forced Exit” and ticks “Only terminate program if it is not responding. Unless you have good reason to do otherwise, just hit Next to take these defaults.
  6. The final page deals with relaunching the program. Again, you can usually just take the defaults and hit “Finish” but if you want to make changes you can.

You may wish to tweak your new macro’s settings after you’ve created it. If so, just double-click on the new macro in PTFB Pro’s main window and work through its tabbed Properties screen.

Find out more about boosting your productivity with autoclicks and macros.
CLICK HERE to download a free 30 day trial, no strings attached. If you aren’t entirely happy simply uninstall!

How to Keep a program running that crashes without warning or error

An office computer has a utility that should be kept running throughout the day, and sometimes colleagues accidentally quit the utility. There’s another program you’d like to keep running, but sometimes it crashes out without any warning or error. These programs need to be restarted immediately.

How to do it …

  1. Open up PTFB Pro’s main window by clicking on its tray icon
  2. Click on “New Macro…” and choose “ProgMon Macro”
  3. Select the program in the resulting list and hit Next
  4. Choose “launch the program if it’s not running”
  5. PTFB Pro will suggest a command line to launch the program. In most cases this will do fine, but if you need to make changes or cause the program to run under a specific account, you can.
  6. When you’re done, hit Finish

You may wish to tweak your new macro’s settings after you’ve created it. By default a macro like this is set to run every second or so, but if you’re happy with PTFB Pro checking for the program say every ten minutes, you can change the repeat delay in the Triggers page.

Find out more about boosting your productivity with autoclicks and macros.
CLICK HERE to download a free 30 day trial, no strings attached. If you aren’t entirely happy simply uninstall!

People keep closing a vital program on our shared office PC. How can I restart it automatically?

There can be lots of reasons why programs close even though you need them to keep running. If they’re buggy, then it could be because they’ve crashed, but in an office situation it could simply be that some other employee has mistakenly closed the program. In these cases it’s tempting to lock the PC in question, but that might not be an option if the PC is shared and open for use by general office staff.

One way round the problem is to use a Program Monitor (“ProgMon”) macro in PTFB Pro. Just follow these steps:

1) Open up PTFB Pro’s main screen, hit “New Macro” and choose “ProgMon Macro”

PTFB Choose Macro

2) Select your vital program in the list on the first wizard page, and hit Next

3) On the next page, select the action “Launch the program if it’s not running” and hit Next

Progmon action page

4) On the final page, you can enter the command line required to launch your program. PTFB Pro will typically provide a base command line but you can add parameters if needed, or even set the program to run under a specific account. Hit Finish when you’re done, then “Start Watching” to put PTFB Pro into action.

From now on, any time PTFB Pro discovers that the program in question has closed it’ll relaunch it automatically!

Find out more about boosting your productivity with autoclicks and macros.
CLICK HERE to download a free 30 day trial, no strings attached. If you aren’t entirely happy simply uninstall!