How to Run the brew upgrade Command on macOS Every Day

The brew upgrade command is a useful tool for updating and upgrading packages on your macOS system. However, remembering to run this command manually every day can be a hassle. Fortunately, there are two different ways to automate this process so that the command runs automatically at the same time every day.

Method 1: Using cron

The first method involves using cron, a Unix-based scheduling tool that is included with macOS. Here’s how to set up a cron job to run the brew upgrade command every day:

  1. Open Terminal on your Mac. You can find Terminal in the Utilities folder within the Applications folder.
  2. Type crontab -e and hit enter to open the crontab editor.
  3. If this is your first time using cron, you may be prompted to choose a text editor. Select your preferred text editor (e.g. nano, vim, emacs).
  4. In the crontab editor, add the following line to schedule the brew upgrade command to run every day at 8am:

Read More

Tags: Every macOS