If you have it, take a look at pmset ; this is capable of temporarily overriding the normal scheduled settings and you could code for your requirements accordingly...
Well you havent said what was your box nor which OS you are talking about...
computer to me could be anything, like many of us I have all sorts except a PC ( not true I have one somewhere but not at home... )
Well this is totally untested pseudo-code but might be useful:
# Shebang and startup code here...
# Followed by...
# _Maybe_ a 'while' loop for cyclic operation...
pm-suspend
printf "Press ENTER to continue:- "
read -r junk
# Your code here...
# A means of quitting the 'while' loop, if used.