An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Previous Thread
Next Thread
Print Thread
I need a Terminal Expert
#63524 02/25/23 11:57 PM
Joined: Sep 2009
Likes: 3
OP Offline

Joined: Sep 2009
Likes: 3
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.


MacBook Pro - M2, Ventura 13.6
Safari Tech Prev 17.0
Safari 16.6
Firefox 116.0.2
iPhone 7 Version 15.8




Re: I need a Terminal Expert
plantsower #63525 02/26/23 03:56 AM
Joined: Aug 2009
Likes: 15
Online

Joined: Aug 2009
Likes: 15
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."


The new Great Equalizer is the SEND button.

In Memory of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire
Re: I need a Terminal Expert
artie505 #63526 02/26/23 04:29 AM
Joined: Sep 2009
Likes: 3
OP Offline

Joined: Sep 2009
Likes: 3
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.

Last edited by plantsower; 02/26/23 04:39 AM.

MacBook Pro - M2, Ventura 13.6
Safari Tech Prev 17.0
Safari 16.6
Firefox 116.0.2
iPhone 7 Version 15.8




Re: I need a Terminal Expert
plantsower #63527 02/26/23 05:33 AM
Joined: Aug 2009
Likes: 15
Online

Joined: Aug 2009
Likes: 15
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.


The new Great Equalizer is the SEND button.

In Memory of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire
Re: I need a Terminal Expert
artie505 #63528 02/26/23 05:43 AM
Joined: Sep 2009
Likes: 3
OP Offline

Joined: Sep 2009
Likes: 3
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]


MacBook Pro - M2, Ventura 13.6
Safari Tech Prev 17.0
Safari 16.6
Firefox 116.0.2
iPhone 7 Version 15.8




Re: I need a Terminal Expert
plantsower #63529 02/26/23 06:12 AM
Joined: Aug 2009
Likes: 15
Online

Joined: Aug 2009
Likes: 15
Tonight's command looks good to me.


The new Great Equalizer is the SEND button.

In Memory of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire
Re: I need a Terminal Expert
artie505 #63530 02/26/23 06:14 AM
Joined: Sep 2009
Likes: 3
OP Offline

Joined: Sep 2009
Likes: 3
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.


MacBook Pro - M2, Ventura 13.6
Safari Tech Prev 17.0
Safari 16.6
Firefox 116.0.2
iPhone 7 Version 15.8




Re: I need a Terminal Expert
plantsower #63531 02/26/23 06:48 AM
Joined: Aug 2009
Likes: 15
Online

Joined: Aug 2009
Likes: 15
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.


The new Great Equalizer is the SEND button.

In Memory of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire
Re: I need a Terminal Expert
plantsower #63532 02/26/23 12:33 PM
Joined: Aug 2009
Likes: 1
Offline

Joined: Aug 2009
Likes: 1
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.

Re: I need a Terminal Expert
Gregg #63533 02/26/23 01:07 PM
Joined: Aug 2009
Likes: 15
Online

Joined: Aug 2009
Likes: 15
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.)


The new Great Equalizer is the SEND button.

In Memory of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire
Re: I need a Terminal Expert
artie505 #63540 02/26/23 06:12 PM
Joined: Sep 2009
Likes: 3
OP Offline

Joined: Sep 2009
Likes: 3
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.


MacBook Pro - M2, Ventura 13.6
Safari Tech Prev 17.0
Safari 16.6
Firefox 116.0.2
iPhone 7 Version 15.8




Re: I need a Terminal Expert
plantsower #63543 02/26/23 07:03 PM
Joined: Aug 2009
Likes: 15
Online

Joined: Aug 2009
Likes: 15
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


The new Great Equalizer is the SEND button.

In Memory of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Moderated by  alternaut, dianne, MacManiac 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.4.33 Page Time: 0.026s Queries: 38 (0.018s) Memory: 0.6306 MB (Peak: 0.7322 MB) Data Comp: Zlib Server Time: 2024-04-18 01:29:31 UTC
Valid HTML 5 and Valid CSS