Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I've been running a python script from the command line that's inserting data in a database for a couple of hours now. It will take at least half a day more before it's finished. However, I want to take the laptop with me to somewhere else. My sleep at closing lid settings (if they exist) are at default (I've never looked at them). If I close the lid and open it in 4 or 5 hours, will the python script resume from where it left off? If not, can this be set to work in the preferences somehow?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

It should continue, if your script has any error-handling for loosing connection to the database (assuming off-site DB).

Though the exact behaviour is hard to predict without seeing the actual code. Sleeping the system may also leed to unexpected results in the script.

share|improve this answer
    
Thanks. It's a local database, so connection is not a problem. –  Niek Nov 6 '12 at 12:09
    
@Niek - so you are testing this for all of us. Can you post your results? :) –  carbontax Nov 6 '12 at 12:19
    
@carbontax it continued where it left off after I opened it again –  Niek Nov 6 '12 at 16:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.