exchangesyncd is a MacOS system process for syncing Microsoft Exchange accounts (i.e., Office 365 and Outlook calendars, reminders, contacts, notes, etc.). For example, I have my work calendars synced up with Apple Calendar, and exchangesyncd is always running to keep them in sync. Unfortunately, exchangesyncd seems to get “stuck” pretty often, and when that happens Exchange records don’t sync properly—or at all—and I have to restart exchangesyncd.
For example, Exchange calendars might be missing events, or events might not get updates, cancellations, or other changes. It’s easy to restart exchangesyncd manually: quit the exchangesyncd process using the Activity Monitor app, and it will automatically restart. Then, refresh Apple Calendar by pressing Command (⌘) + R in the app, and any Exchange calendars should start updating again.
But restarting exchangesyncd manually is tedious when I have to do it several times a day. A better option is to restart exchangesyncd automatically, on a schedule. There are a few different ways to do this, but it’s easy to do with cron.
Open the Terminal app and run this command:
EDITOR=nano crontab -eThis uses the nano text editor to open the crontab file for editing. (Without EDITOR=nano, the crontab file would open with the default text editor for files opened from the command line, which is Vim, and Vim is hard to use if you don’t have experience with it.)
Then, paste this into the crontab file on a blank line:
0 */3 * * * killall exchangesyncdEach line of the crontab contains a cronjob, which is composed of a schedule (0 */3 * * *, or every 3 hours, on the hour) and a Bash command (killall exchangesyncd, which kills all running processes named exchangesyncd). Restarting exchangesyncd every 3 hours is probably overkill, but it doesn’t really hurt anything. In fact, you could use 0 * * * * to restart it hourly.
Press Control (⌃) + X to exit nano, then Y to save the changes. If you get a “‘Terminal.app’ would like to administer your computer.” warning, click the Allow button.
- To make sure it worked, run
crontab -l. You should see the line you added to the crontab file. - To make sure exchangesyncd is restarting on schedule, run
ps -o etime $(pgrep -x exchangesyncd)to see how much time has elapsed since it was last launched. That time should match up with the schedule in your cronjob.
Now exchangesyncd will be restarted every 3 hours and you should have fewer sync issues!