Josh McVey

Work Setup

I recently updated my local setup to include a nice mic and some fabulous headphones. I totally recommend everything on the list. Paired with my 2015 Macbook Pro my coworkers say I sound like I am on the radio in Zoom meetings.

BUT the headphones work almost too well at shutting out the world! I used my Google home to alert me 1 minute before meetings. When I am playing music I can't hear the Google home go off... at max volume....... half a meter away...........

Cron with Crontab

So I decided to play an alert a few times in the headphones, at least for recurring meetings.

crontab -e

Then I added this line

29 09 * * 1,2,3,4,5 for i in {1..4}; do afplay /path/to/alert_sound.mp3; done

Now every weekday at 9:29 AM I get an alert in my headphones and jump into standup.

I also added a couple other tasks to crontab. I have a nice script to automatically install the latest chromedriver and I like to keep brew up to date.

  • At 8:00 AM everyday, if my machine is awake brew will upgrade.
  • At 8:01 AM everyday, if my machine is awake this couple of commands will navigate to a repo I have for scripts, pipenv run to use my dependencies, and run the script.
00 08 * * * /usr/local/bin/brew upgrade >/tmp/stdout.log 2>/tmp/stderr.log
01 08 * * * cd /directory/where/you/put/the/file \
&& pipenv run python ./getchromedriver.py \
>/tmp/stdout.log 2>/tmp/stderr.log

Here is the getchromedriver.py