Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

MacOS comes with daily/weekly/monthly system tasks. However it looks like I have to manually start those tasks. Is there a way to automatically have those tasks executed daily/weekly/monthly?

share|improve this question
up vote 5 down vote accepted

They are named like this because they are already executed daily, weekly and monthly. MainMenu just lets you execute them manually.

Open Terminal and enter the following:

ls -al /var/log/*.out

The dates listed next to these log file names are when the respective maintenance task was last executed:

-rw-r--r--  1 root  wheel  496994  5 Mar 03:15 /var/log/daily.out
-rw-r--r--  1 root  wheel    2088  1 Mar 06:02 /var/log/monthly.out
-rw-r--r--  1 root  wheel    5289  5 Mar 03:15 /var/log/weekly.out

Run them manually using the periodic command. You need root permissions to do so, and need to supply which you want to execute. To run all of them:

sudo periodic daily weekly monthly

You can use AppleScript Editor to make a Script or Application that executes e.g. the weekly task by entering this:

do shell script "periodic weekly" with administrator privileges

Using Automator, you can make it into a service.


To change when these tasks are regularly scheduled, edit their preference files:

/System/Library/LaunchDaemons/com.apple.periodic-daily.plist
/System/Library/LaunchDaemons/com.apple.periodic-weekly.plist
/System/Library/LaunchDaemons/com.apple.periodic-monthly.plist

You can use Property List Editor included with Apple's Developer Tools, or a simple text editor. Look for <key>StartCalendarInterval</key>. When they're running is pretty self-explanatory:

Daily runs at 3:15 AM if it can:

<dict>
    <key>Hour</key>
    <integer>3</integer>
    <key>Minute</key>
    <integer>15</integer>
</dict>

Once a week runs Saturday:

<dict>
    <key>Hour</key>
    <integer>3</integer>
    <key>Minute</key>
    <integer>15</integer>
    <key>Weekday</key>
    <integer>6</integer>
</dict>

Once a month on the first day of the month:

<dict>
    <key>Hour</key>
    <integer>5</integer>
    <key>Minute</key>
    <integer>30</integer>
    <key>Day</key>
    <integer>1</integer>
</dict>

This website explains what happens when these scripts are run.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .