Home
Posted By: plantsower I need a Terminal Expert - 02/25/23 11:57 PM
I finally found a terminal command that is supposed to put my MacBook to sleep at the time I want it to everyday.

It's: sudo pmset repeat shutdown MTWRFSU 01:00:00

If I want to undo this or change it because I need a change or because this didn't work, how do I do that?

Thanks.
Posted By: artie505 Re: I need a Terminal Expert - 02/26/23 03:56 AM
Originally Posted by plantsower
I finally found a terminal command that is supposed to put my MacBook to sleep at the time I want it to everyday.

It's: sudo pmset repeat shutdown MTWRFSU 01:00:00

If I want to undo this or change it because I need a change or because this didn't work, how do I do that?

Thanks.
I'm not your expert, but I'll note that "shutdown" is not the same as "sleep."

I just looked at the pmset man page, and - and this assumes that your command is correct - it looks like you can undo your command by changing the time to "0" (no quotes) or change its schedule by changing or eliminating days. And you may also want to change "shutdown" to "sleep."
Posted By: plantsower Re: I need a Terminal Expert - 02/26/23 04:29 AM
Originally Posted by artie505
Originally Posted by plantsower
I finally found a terminal command that is supposed to put my MacBook to sleep at the time I want it to everyday.

It's: sudo pmset repeat shutdown MTWRFSU 01:00:00

If I want to undo this or change it because I need a change or because this didn't work, how do I do that?

Thanks.
I'm not your expert, but I'll note that "shutdown" is not the same as "sleep." I didn't notice it said shut down so I will change it to sleep.

I just looked at the pmset man page, and - and this assumes that your command is correct - it looks like you can undo your command by changing the time to "0" (no quotes) or change its schedule by changing or eliminating days. And you may also want to change "shutdown" to "sleep."
My question is how do I find my terminal command to undo it in the future? Does this sound right? I found it online. You can check to see what commands are in your history at any time by running the history command. When you type history and press Return, Terminal displays a list of the commands in the history list.
Posted By: artie505 Re: I need a Terminal Expert - 02/26/23 05:33 AM
Originally Posted by plantsower
My question is how do I find my terminal command to undo it in the future? Does this sound right? I found it online. You can check to see what commands are in your history at any time by running the history command. When you type history and press Return, Terminal displays a list of the commands in the history list.
You don't have to go back to your original command entry to change it. You just retype the command with new parameters.

I ran "history," but it didn't give me a complete history, only items "201 - 216," but with no time frame.

You can also call up past entries by launching Terminal and hitting the up arrow, but it can be awful tedious.

By the way, you need to be awful confident of your sources if you're going to run commands you found with a Google search.
Posted By: plantsower Re: I need a Terminal Expert - 02/26/23 05:43 AM
I'm not confident at all, that's why I asked for help. But the command I might put in tonight seems like it wouldn't hurt anything. Hope I'm right. I'm not trying to delete files or anything.

By the way, you need to be awful confident of your sources if you're going to run commands you found with a Google search. [/quote]
Posted By: artie505 Re: I need a Terminal Expert - 02/26/23 06:12 AM
Tonight's command looks good to me.
Posted By: plantsower Re: I need a Terminal Expert - 02/26/23 06:14 AM
Good because I took a chance and did it. I'll try to remember to keep you in the loop!


Originally Posted by artie505
Tonight's command looks good to me.
Posted By: artie505 Re: I need a Terminal Expert - 02/26/23 06:48 AM
Originally Posted by plantsower
Good because I took a chance and did it. I'll try to remember to keep you in the loop!
If we don't hear within a week that the command has failed, we'll know that it worked.

By the way, I don't know if there's a way to set multiple events iin Terminal, but I know you can do it in TinkerTool System.
Posted By: Gregg Re: I need a Terminal Expert - 02/26/23 12:33 PM
Originally Posted by plantsower
[quote=artie505][quote=plantsower]I finally found a terminal command that is supposed to put my MacBook to sleep at the time I want it to everyday.

It's: sudo pmset repeat shutdown MTWRFSU 01:00:00

If I want to undo this or change it because I need a change or because this didn't work, how do I do that?

Thanks.

I'm not your expert either, but the suggestion to re-enter that command changing parameters is on target. However, I suspect that the bolded text would be the parameter to change if you want to CANCEL the action. I'd bet it's either that or the days of the week.
Posted By: artie505 Re: I need a Terminal Expert - 02/26/23 01:07 PM
Both wrong!

I did a lousy job of reading the man pmset page. ("0" is the correct answer in some situations, but not this one.)

According to Apple: sudo pmset repeat cancel: Cancel the current schedule.

Ha!!! I just looked at Rita's initial post, and it includes the "cancel" command. (It's actually a marked-up copy of Apple's instructions...and should have been noted as such.)
Posted By: plantsower Re: I need a Terminal Expert - 02/26/23 06:12 PM
IT WORKED!! If you didn't hear from me in a week that means I really screwed up my computer!

Originally Posted by artie505
Originally Posted by plantsower
Good because I took a chance and did it. I'll try to remember to keep you in the loop!
If we don't hear within a week that the command has failed, we'll know that it worked.

By the way, I don't know if there's a way to set multiple events iin Terminal, but I know you can do it in TinkerTool System.
Posted By: artie505 Re: I need a Terminal Expert - 02/26/23 07:03 PM
Originally Posted by plantsower
IT WORKED!! If you didn't hear from me in a week that means I really screwed up my computer!
smile
© FineTunedMac