Batch Backtesting with multiple time frames

Hello,
Is there a way to program either using the batch tools or some other method of backtesting a file such that when it is run it runs through the 2 minute timeframe and if there is no result then to go to the 3 minute time frame and if there is no result then continue up to a timeframe that I set such as 33 minute or stop if there is a result?
Also if the above is possible, how would you program it to continue without restarting from the beginning but from where it left off?
My goal is to set timeframes like run from 1 minute to 45 minutes and have the results exported.