Task Scheduler - how to get it to work!

Discussion in 'Windows 7 Help and Support' started by JETNZ, May 22, 2012.

  1. JETNZ

    JETNZ New Member

    May 22, 2012
    Likes Received:
    How to use the Task Manager in Windows 7 Professional

    This is VERY troublesome. There are numerous comments and suggestions in various forums by frustrated users unable successfully to fight their way through the myriad of options that do not work seamlessly. What worked so easily under XP Professional seems hopelessly complex and difficult under Windows 7 Professional. However, after much experimentation I have finally got a Windows 7 machine to do what it is supposed to. I'd like to share my findings with others in order to help (hopefully) reduce their time finding the solution...

    I am running a machine to collect data from a weather station and marine thermal monitoring equipment every few minutes using RF links with an Arduino board controlling transmitter and receiver. The data arrives in the computer via a serial/usb dongle on the back of the radio. Every 20 minutes the incoming data is dumped into a file, the file is closed and then a new file opened for the next load of data. At the end of each 24 hour cycle, a suite of 11 programs are run in sequence to massage all the daily files, reformat them, carry out analysis at various levels, rewrite some html files, produce graphs, and then the final task is to upload revised html files and images to a server for a web page. The system is designed to run 24 hours a day and 365 days a year without interruption.

    There are at least three things which do interrupt the machine, and it is therefore advisable to disable these functions. They are:

    1: Power outages. I live in an area where there are frequent outages. Usually these only last a few minutes, but sometimes they last much longer. It is essential to have an UPS to provide power in these cases. I use a 1000 VA/600 watt Dynamix, which in theory (specifications) could provide up to 100 minutes backup (unlikely).

    2: Disable automatic windows updates, which occasionally reboots the system without permission from the user.
    Control panel
    Windows update
    Change Settings
    Never Check for updates

    3: Disable Power saving protocol, such as sleep, monitor off, etc.
    Control panel
    Power Options
    (choose) High Performance
    Change Plan settings
    - On Battery Plugged in
    Dim 5 minutes Never
    Display Off 10 minutes Never
    Sleep computer Never Never

    4: Turn off the display when the PC is running to save the screen from pixel damage.

    5: Most of the problems with obtaining successful use of the Task Scheduler in Windows 7 arise from the UAC (User Account Control) being a lot more strict than in XP-Professional, and in particular security relating to blank passwords. In XP-Pro it is possible to undo this password requirement, which makes things a lot simpler. The method for doing this in Windows-7 is similar to XP-Pro, and this is how it is done.
    type regedit (click OK)
    click Yes
    Open up the + for HKEY_LOCAL_MACHINE
    Open up the + for System
    Open up the + for Current control set
    Open up the + for Control
    Click Lsa
    Double click LimitBlankPasswordUse
    change the 1 to 0 (Hex)

    6: Unfortunately, unlike with XP-Pro, undoing the blank password requirement is not the end of the matter with Windows 7 passwords. It is necessary to provide a password for each task in the task scheduler to function. This has a number of unfortunate implications, such as restricting access within your home network. However, it must be done. Here is how:
    Control Panel
    user account
    Create a password for your account
    ***** (enter twice)
    NB: One can also remove your password later which is kind of Windows 7.

    7: Under XP-Pro when a program, say TIDES.EXE, was entered into the task scheduler, the scheduler was clever enough to understand that any input files that were required or output files produced would reside in the same folder as TIDES.EXE unless the code inside the EXE file had specified otherwise. Not so, for Windows-7. It has been necessary for me to revise all my pascal code to specify full pathnames for every file opened or closed by the software, and recompile the code. It is also necessary fully to specify pathnames for any BAT files that you want the task scheduler to run. For example, a typical BAT file will have to look like this:
    d:\seawater\nguplot.exe d:\seawater\sensor5.cfg
    and inside the cfg file all input and output files will also require full pathnames. This seems extremely stupid.

    8: Gaining adequate privilege for a task is the next problem. With windows explorer, navigate to the EXE file you want to run by autopilot, and right click on it, and then click on properties.
    click edit
    One at a time allow "Full control" for each of
    Authenticated users

    9:Finally, we have reached the point where one can install a task in the Task Scheduler.
    Control Panel
    Administrative tools
    Task scheduler
    Create a basic task
    Name: enter something, eg : "Update Tidal Predictions", and click Next
    Select Trigger daily, and click Next
    Select a starting date, the regular time, and 1 day, and click Next
    Start a program, and click Next
    Browse to the exe file, eg D:\SEAWATER\TIDES.EXE, and click Open

    10: Oh, No, not quite finished yet. It still wont run. You need now to:
    Highlight your task "Update Tidal Predictions" and click Properties
    Select Run whether user is logged on or not
    Select Run with highest privileges
    Select Configure for Windows 7
    Enter password *****
    Now at last you really are finished. If you have several tasks (I have 11, spaced every 3 minutes at 1am every day), you need to repeat all of this for each task.

    Good luck

Share This Page