Skip to content

Schedule Task to Automatically Run All .inp Files in a Selected Folder

Posted by Christine Obbink-Huizer

Home > Blog > Schedule Task to Automatically Run All .inp Files in a Selected Folder

Table of contents

    Schedule Task to Automatically Run All .Inp Files in a Selected Folder

    With limited resources, it can make sense to create .inp files using Abaqus/CAE during the day, and then run the jobs during the night. It would be easy if this can be done automatically for all files in a specified folder. Using Windows, this is not very difficult. I will show you how to do it in this blog.

    Create .bat File

    First, create a .bat file that runs all the .inp files in the folder it is in. This can be done by opening a text editor, copying the following text:

    for %%g in (*.inp) do (
    abaqus job=%%g int ask=off
    )

    and saving it using .bat as extension. You can double click the file to run it. This can be done for testing purposes but also if you do not want to run the simulations at a specified point in time automatically, but prefer to run the .inp files in the folder on command. If that is the case, you do not need to do anything else.

    Automatically Run Script

    To automatically run the script at a specified time, for example at 17:00 h each day, the next step is to schedule a task using windows task scheduler.

    Create Task and Select When to Run It

    Open the task scheduler, and select ‘create basic task’

    Open the task scheduler, and select ‘create basic task’

    Fill in a name (and description if wanted) and click next.
    Select when the task should start, in this case daily at 17:00:

    Select when the task should start, in this case daily at 17:00Select when the task should start, in this case daily at 17:00

    Select Action to Perform: Run Script 

    As ‘action’ choose ‘start a program’

    As ‘action’ choose ‘start a program’

    For the progam/script browse to the .bat you have created. With the example script you do not need any arguments. For ‘Start in (optional):’ fill in the folder where the script is located (without quotation marks).

    For ‘Start in (optional):’ fill in the folder where the script is located (without quotation marks)

    Click ‘finish’ and that’s it!

    Done!

    Do remember to move the files the next day, or the simulations will be run again.

    Request a Quote for Abaqus Now

    Simulation Driven Innovation.

    TECHNIA Simulation provides top tier FEA, Non-linear, and Advanced Simulation Software, Training, and Consultancy. Our dedicated team of more than 65 Simulation experts across 16 countries advise and support your innovation with a wealth of specialist knowledge and experience.

    About TECHNIA
    Want to receive more content like this?
    • Related news and articles straight to your inbox
    • Hints, tips & how-tos
    • Thought leadership articles

    VISIT THE KNOWLEDGE HUB

    Helping you find the information you’re looking for. Discover webinars, events, FAQ's, case studies and tutorials.

    VIEW HUB
    © TECHNIA 2023 (Part of the Addnode Group) TECHNIA is certified according to ISO standards 9001:2015, 14001:2015 and 27001:2015 – Quality & Environment