Loading ...
Sorry, an error occurred while loading the content.

Re: [GEO-Subscribers] program problem

Expand Messages
  • David J Taylor
    ... Robert, It should be quite easy using commands already available to you in Windows XP. Here s a sample command-file script you could schedule to run once
    Message 1 of 5 , Jan 1, 2011
    View Source
    • 0 Attachment
      > I hope this is not wandering too far OT – but weather observation is
      > Earth observing! I run WeatherLink to feed data to my weather station
      > web site. Very occasionally this program just stops running – so far I
      > have not found out why … but that’s for me to deal with. I have just
      > been away for three days, the program stopped on the first evening so my
      > web page was out of date until this evening when I returned home.
      > Does anyone know of a bit of software that will regularly check to see
      > if a program is running, and if not, launch it?
      > Robert

      Robert,

      It should be quite easy using commands already available to you in Windows
      XP. Here's a sample command-file script you could schedule to run once
      every few hours. Save the few lines below as CheckTask.txt using
      Notepad, and then rename the file as CheckTask.cmd so that it is known as
      a command-file to Windows.

      __________________________________________
      tasklist | findstr /I /B Notepad.exe
      IF ERRORLEVEL 1 (
      ECHO Notepad.exe not running
      )
      __________________________________________


      Obviously, substitute the name of your own .exe program to check for
      "Notepad.exe" in the first line, and substitute the commands to restart
      your application in the indented ECHO line in the example above.

      The "tasklist" command may not be in XP Home, but you could use pslist
      from SysInternals instead:
      http://technet.microsoft.com/en-gb/sysinternals/bb896682

      To show that the script is working, try it with Notepad running or not, as
      per my example.

      I have information about adding a scheduled task for Windows XP on my Web
      site:
      http://www.satsignal.eu/software/scheduled-tasks.html
      and there is similar information for Vista/Windows-7 here:
      http://www.sevenforums.com/tutorials/12444-task-scheduler-create-new-task.html

      Hope that helps!

      Happy New Year to all.
      David
      --
      SatSignal software - quality software written to your requirements
      Web: http://www.satsignal.eu
      Email: david-taylor@...
    • Moore, Robert
      Thanks David and Andy, I spent some time with your little program David and it worked fine, checking for and launching Notepad and one or two other programs,
      Message 2 of 5 , Jan 1, 2011
      View Source
      • 0 Attachment
        Thanks David and Andy, I spent some time with your little program David and it worked fine, checking for and launching Notepad and one or two other programs, but it simply wouldn't recognise WeatherLink. I tried using the full path name and inverted commas around the latter - but all to no avail. Very frustrating. I'm hanging on to this template though, it is obviously very useful.
        Andy I rather chickened out and settled for 'ApplicationMonitor' which _does_ recognise WeatherLink. It seems to be working OK and restarted the program when I closed it down.

        Robert



        It should be quite easy using commands already available to you in Windows
        XP. Here's a sample command-file script you could schedule to run once
        every few hours. Save the few lines below as CheckTask.txt using
        Notepad, and then rename the file as CheckTask.cmd so that it is known as
        a command-file to Windows.

        __________________________________________
        tasklist | findstr /I /B Notepad.exe
        IF ERRORLEVEL 1 (
        ECHO Notepad.exe not running
        )
        __________________________________________


        Obviously, substitute the name of your own .exe program to check for
        "Notepad.exe" in the first line, and substitute the commands to restart
        your application in the indented ECHO line in the example above.
      • David J Taylor
        ... Robert, All you need to do is to check the name of the .EXE which is running when WeatherLink is running. Compare the results of TaskList with and without
        Message 3 of 5 , Jan 1, 2011
        View Source
        • 0 Attachment
          > Thanks David and Andy, I spent some time with your little program David
          > and it worked fine, checking for and launching Notepad and one or two
          > other programs, but it simply wouldn't recognise WeatherLink. I tried
          > using the full path name and inverted commas around the latter - but all
          > to no avail. Very frustrating. I'm hanging on to this template though,
          > it is obviously very useful.
          > Andy I rather chickened out and settled for 'ApplicationMonitor' which
          > _does_ recognise WeatherLink. It seems to be working OK and restarted
          > the program when I closed it down.
          >
          > Robert

          Robert,

          All you need to do is to check the name of the .EXE which is running when
          WeatherLink is running. Compare the results of TaskList with and without
          the program running, or use the Task Manager, Processes tab.

          Andy's point about detecting a hang rather than simply "program exit" is a
          valid one, though.

          Cheers,
          David
          --
          SatSignal software - quality software written to your requirements
          Web: http://www.satsignal.eu
          Email: david-taylor@...
        Your message has been successfully submitted and would be delivered to recipients shortly.