usb to .wav automatically

We use Audacity to capture data coming from an usb port and saving that as a .wav file. We need that process to run automatically in some way but I have no clue about whether that is possible and if so, how. Any help is highly appreciated.

How much automation do you need?
Please describe exactly what you are wanting to do. It will save us a lot of time if you provide a clear picture, rather than us trying to guess.