Windows Schedules Tasks

SHOW ALL CONTENT

Table of contents

Introduction

To run the Octopus programs automatically, you need to create a Windows scheduled task. This article will provide you with guide lines to do so.

Related Articles

Prerequisites

  • Identify the computer that will be used to execute the Octopus program. We recommend the use of a server, or minimally a computer that is always turned on
  • Plan occurrences under which the program should run automatically
    • Pay special attention to scheduling conflicts with other scheduled tasks like backups or reboots, especially in case of data transfer
    • MailIntegration should be run according to your environment and your response targets, between 3 to 10 mintues
    • Check not to run the task again if it is already running.
  • Determine the access level of the batch file user
    • WMIUpdater needs to be run by an user with administrator rights on the targeted computers (usually domain admin)
    • An option is to create a Windows account to run the scheduled tasks

Programing the scheduled task

  • Create a batch file containing the commands and associated parameters that you wish to use
    • You can add multiple commands one after the other to perform many operations
    • We recommend the use of a batch file because it is easier to modify this file then to change the scheduled task
    • Validate that the batch file works before going forward with the automation
    • Refer to the operating system documentation of the machine used to run the scheduled task to edit the batch file
  • Create a scheduled task that will run the batch file according to the schedule
    • Access the task manager from Control Panel > Administration Tools > Scheduled Tasks
    • Create a new task
    • Give it a significant name
      • Depending on the size of your IT environment, there could be several other tasks present
    • Select the schedule and the frequence of execution according to what you have previously determined
    • In the program field, add the name of the batch file previously created
    • The parameter field can stay empty
    • Specify the account to be use to run the task
      • You will need to enter the password each time you need to modify the scheduled task
      • Keep the password in a secure place. If the password changes, you will need to update it for each scheduled task
    • Refer to the operating system documentation of the machine used to run the scheduled task to configure the schedualed task
  • Test the scheduled task right away. The program generates a .log file in which the results of the execution can be found; it is located in the Octopus folder. You can also see if the task worked by looking for results directly in Octopus


    ** If you have several mailboxes, it is generally recommended to have a single Windows scheduled task that will run a batch file that will launch MailIntegration as many times as you have mailboxes.
     

Tips and Tricks

To monitor this task, use the free Blat application to end your batch file with an email notification sent to the person responsible of automation.

X
Help us improve our articles








Help us improve our articles