I'd like to create a script that will do the following. Start at a given time during the day and end at another given time.
So for example, I have a program I'd like to test, so my script would be set to start at say 10:00pm and continue to run until 9:00am.
This follows on from my other question about running programs again and again.
I have the following:
#!/bin/bash trap "echo manual abort; exit 1" 1 2 3 15; RUNS=0; while open -W /Path/to/Program.app do RUNS=$((RUNS+1)); echo $RUNS > /temp/autotest_run_count.txt; done exit 0
This script essentially runs my program (in Mac OSX) and catches any failures, otherwise it will re-run the program when it closes.
I'd like to be able to run this like I mentioned above. Start at 10:00pm. Finish at 9:00am.
Your advice is always useful.