You are here: MONITOR Basics > Configuration and Maintenance > AutoRuns > Creating a Scheduled AutoRun in Windows

Creating a Scheduled AutoRun in Windows

In the example below a scheduled task is created on the database server (Windows 2008) where it is most common to add automatic runs.

  1. Select Task Scheduler under Start -> Administrative Tools on the Start menu in Windows. Then select the guide Create Basic Task... to the right in the window.


  2. You should enter a name and a description, if any, for the scheduled activity. Then click Next >.


  3. Here you select "trigger" for the AutoRun. In the example below it has been set to "Weekly". Then you can select which weekdays the activity should run. Then click Next >.


  4. This window will appear in different ways based on the selection made in the previous dialog window. Since this example is based on the "weekly" alternative, you get the opportunity to select which weekdays and on which times the activity should run. Here it is selected that the AutoRun should take place at 22:00 (that is, 10:00 p.m.) on Mondays, Wednesdays and Fridays, and should be repeated each week. Then click Next >.


  5. In the next step the default option is kept; that the activity's action is to start a program. Then click Next >.


  6. In the next step you should find and select the monwin.exe using the Browse... button. This file is normally located in the local folder called C:\Monwin. Then add A=1 as argument, please see the section called Startup Parameters for AutoRuns. Also enter that monwin.exe should start in the same folder. Then click Next >.


  7. In the next step you should check the check box Open the Properties dialog for this task when I click Finish. Then click Finish.


  8. In the next step you should select Change User or Group... in order to select which user account in the domain that should run the activity. It should be the user account intended for the same user in MONITOR as you selected when you configured "AutoStart" for the Run Netting procedure in My windows / AutoStart. Also enter the user's password for logging on to the domain (this allows the computer/server not to keep the user logged on when the workday is over). Then select the alternative Run whether user is logged on or not. Finally, click OK.

Error Codes

The task scheduler shows the status of the run as a value, for example if a problem occurred during scheduling or if the program that was run returned a code indicating how the run was made. The value is shown as a hexadecimal, for example 0x0.

Besides the codes that the task scheduler generates, the task scheduler can also receive the following codes from MONITOR: 0 = OK, -1 = system error, 1 = datawindow error, 2 = database error, 9 = dotnet

See also:

Previous description that apply to Windows XP/2003