Automate Your Workflow: Inspire Batch Mode Processing with Windows Task Scheduler

Karthi Kandasamy
Karthi Kandasamy
Altair Employee
edited August 26 in Altair HyperWorks

The Windows Task Scheduler is a powerful and versatile tool integrated into the Microsoft Windows operating system.
It allows users to automate the execution of tasks at specific times or in response to particular system events. This
capability is essential for both personal and enterprise-level computing, where routine tasks need to be performed
consistently without manual intervention.

Inspire batch mode can leverage this functionality and can do automated task without user intervention.

Below are the detailed steps how to setup a Windows Task Scheduler for a inspire batch mode.

Step 1: Prepare Your Batch File

  1. Create the Batch File:
  2. Test the Batch File:
    • Before scheduling, double-click the .bat file to ensure it runs correctly.

Step 2: Open Task Scheduler

  1. Access Task Scheduler:
    • Press Win + S and type "Task Scheduler" in the search bar.
    • Click on "Task Scheduler" in the results to open it.

Step 3: Create a New Task

  1. Create Task:
    • In the Task Scheduler, click on "Create Task" in the right-hand pane under "Actions."
  2. General Tab:
    • Name: Enter a name for your task (e.g., Backup Task).
    • Description: (Optional) Provide a description of the task.
    • Security Options:
      • Choose "Run only when user is logged on" if the task does not need to run while the user is logged off.
      • Choose "Run whether user is logged on or not" if the task should run in the background, even when logged off. (You may need to enter your credentials if you select this.)
      • Optionally, check "Run with highest privileges" if your task requires administrator rights.

Step 4: Set the Trigger

  1. Triggers Tab:
    • Click on "New..." to create a new trigger.
    • Begin the task: Choose when you want the task to start (e.g., "On a schedule").
    • Set the specifics of the trigger:
      • One time: For a one-time execution.
      • Daily: For daily execution.
      • Weekly: For weekly execution.
      • Monthly: For monthly execution.
    • Advanced settings: Configure additional options such as delays, repeat frequency, or expiration.
    • Click "OK" to save the trigger.

Step 5: Set the Action

  1. Actions Tab:
    • Click on "New..." to create a new action.
    • Action: Ensure "Start a program" is selected.
    • Program/script: Click "Browse..." and navigate to your .bat file.
    • Add arguments (optional): If your batch file requires any arguments, you can enter them here.
    • Start in (optional): Specify the working directory for the batch file if necessary (usually the folder where the batch file resides).
    • Click "OK" to save the action.

Step 6: Configure Additional Settings (Optional)

  1. Conditions Tab:
    • Configure conditions under which the task will run, such as only when the computer is idle, or only when it’s on AC power.
    • Check or uncheck options based on your needs.
  2. Settings Tab:
    • Configure settings like allowing the task to run on demand, stopping the task if it runs too long, or forcing it to start if a scheduled time is missed.

Step 7: Finalize and Test

  1. Review and Save:
    • Review all settings to ensure everything is correct.
    • Click "OK" to save the task.
    • If you chose "Run whether user is logged on or not," you might be prompted to enter your Windows credentials.
  2. Test the Task:
    • In the Task Scheduler library, find your task.
    • Right-click on it and select "Run" to test if it executes as expected.
  3. Check for Errors:
    • If the task fails, check the "History" tab of the task to see what went wrong.
    • Verify that the batch file works manually and that all paths are correct.

Step 8: Monitor and Manage the Task

  1. Monitor the Task:
    • Periodically check the Task Scheduler to ensure the task is running as expected.
  2. Edit or Delete the Task:
    • To edit the task, right-click it and select "Properties."
    • To delete the task, right-click it and select "Delete."

This step-by-step guide should help you successfully create and manage a Windows Scheduled Task that runs a .bat file.

 

Happy scripting!