Using cron to restart weekly?

I have a Mac Mini that runs my house, and after a week or two, it starts to get "slow". It's running the very recent versions of everything (I typically install the newest versions about two weeks after they're released). But... it still gets slow. While I try to track down "why", I thought I'd schedule a cronjob for "root" to reboot/restart it every other weekend. It should be fairly simple (a "/sbin/shutdown -r now" command).


All the apps that are running won't have "unsaved docs", so I won't lose any data. I do this manually via Apple --> Restart now, but would love to have it done "automatically".


Is there a better way to do this? Any reason I shouldn't?


Thanks for any advice/opinions!


Steve

Mac mini, OS X Yosemite (10.10.2), 8Gb RAM

Posted on Mar 14, 2015 9:18 AM

Reply
5 replies

Mar 14, 2015 9:46 AM in response to parkerpress

I'm not sure I understand the question, is this computer unused or used for something like bitcoin mining where it can be idle for long periods of time and you want to have a program that restarts for you? If so you will need to set all application you want to have turn on when you restart to open on startup and to do that you need to go into System Preferences>Users and Groups>Login Items and to set the schedule, you need to go into Energy Saver>Schedule(It's at the very bottom of the preference pane)>Click sleep(It looks greyed out but it isn't)>Change sleep to restart. In order for this to work you cannot have a password.

Mar 14, 2015 10:34 AM in response to parkerpress

When you see a beachball cursor or the slowness is especially bad, note the exact time: hour, minute, second.

These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.

Launch the Console application in any of the following ways:

☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)

☞ In the Finder, select Go Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.

☞ Open LaunchPad and start typing the name.

The title of the Console window should be All Messages. If it isn't, select

SYSTEM LOG QUERIES All Messages

from the log list on the left. If you don't see that list, select

View Show Log List

from the menu bar at the top of the screen.

Each message in the log begins with the date and time when it was entered. Scroll back to the time you noted above.

Select the messages entered from then until the end of the episode, or until they start to repeat, whichever comes first.

Copy the messages to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.

The log contains a vast amount of information, almost all of it useless for solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.

Please don't indiscriminately dump thousands of lines from the log into this discussion.

Please don't post screenshots of log messages—post the text.

Some private information, such as your name, may appear in the log. Anonymize before posting.

Mar 14, 2015 11:02 AM in response to Linc Davis

Not sure what this is all about. I'm not seeing beach balls, and know how to read /var/log files (system logs), but those aren't what I was asking for here. I just needed to know how to restart weekly so my home automation system works more efficiently. I think there's a slow memory leak there, but haven't found it yet.


Appreciate the attempt at help, though.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Using cron to restart weekly?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.