Automatic Audio Record on start

Hello, i would like to make a script for automatic Audio recording (arecord). If the Pi get power der MIC IN Jack have to record and save the files in 1 min files.

Can somebody help me? I try different ways.

On which audio hat? you mean that you want to record on jack insertion?
none of the Raspberry pi codec got a jack detect pin.

Btw, this kind of job could be donc by chatgpt.