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’
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 Action to Perform: Run Script
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).
Click ‘finish’ and that’s it!
Done!
Do remember to move the files the next day, or the simulations will be run again.