2

I would like to try and get my Mac (OS X 10.12.6) to set a poweron time in terminal, 1 minute from running the code.

So far I can get a specific time by inputting

date -v+1M

And I can get a specific power time by inputting

sudo pmset schedule poweron "mm/dd/yyyy hh:MM:SS"

But I would like to combine them and get my Mac to run

sudo pmset schedule poweron "date -v+1M"

And then run sudo shut down now.

Effectively telling my Mac to turn itself back on in 1 minutes time.

Help? I have been trying for days, but I am new to coding.

0

You need to set the date (in the future) and format it so it's compliant with pmset

Your command should be:

date -v+1M "+%m/%d/%Y %T"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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