Skip to content

Instantly share code, notes, and snippets.

@ejke
Last active March 24, 2022 03:40
Show Gist options
  • Save ejke/b2be57632289ca9379c5624ddf57718d to your computer and use it in GitHub Desktop.
Save ejke/b2be57632289ca9379c5624ddf57718d to your computer and use it in GitHub Desktop.
Let your computer open those pesky meetings at the right time for you. Never miss a meeting notification anymore.

Open regular Zoom meetings automatically

Easy way to let cron to open + join to the re-occuring meeting for you.

1. Make a bash script

Create a new file in you fave code editor. Insert following

#!/bin/bash
open zoommtg://zoom.us/j/12312312312?pwd=aBaBABABaBAbAmb1abAbABBB1ABAbAb12

Change the zoom id (12312312312) and password (aBaBABABaBAbAmb1abAbABBB1ABAbAb12) to your meeting.

NB! If you're using Catalina MacOS, you need to specify the application you want to use, like this:

#!/bin/bash
open -a Zoom.us.app zoommtg://zoom.us/j/12312312312?pwd=aBaBABABaBAbAmb1abAbABBB1ABAbAb12

2. Save the file and make executable

Good to keep those cron job scripts in one place, like ~/.scripts/ directory. Name it descriptively based on your meeting, like "standup_cron.sh".

To actually allow cron to run your script, you need to make it executable. Change names and run a command:

$: chmod +x /Users/MY-NAME/.scripts/standup_cron.sh

3. Understand cron

Install cron if you don't already have it. Process depends on you OS. Mac and Linux should have it installed already. man crontab shows you all options.

Run to see what cronjobs you already have, if any

$: crontab -l

Now, the cron job is made out of timings and path to script or command to run. Essentially, it could look like this:

28 9 * * 1,2,3,4,5 /Users/MY-NAME/.scripts/standup_cron.sh

Cron schedule is made out of 5 spots for different time-related data.

* * * * * command

(from left-to-right)
* - minute (0-59)
* - hour (0-23)
* - day of the month (1-31)
* - month (1-12)
* - day of the week (0-6, 0 is Sunday)
command - command to execute

So, the command above would run every day at 9:28AM.

It can be quite complicated to wrap your head around, so I'd recommend this handy tool for figuring out what output you need.

4. Set a new cron job

Open cron VIM editor by running

$: crontab -e

Every job needs to be on it's own line.

Vim cheatsheet

start to insert data: Shift + i

save and close the editor: Esc, :, x, !, Enter

Change the time and pathname of the script, insert new cronjob and exit file.

28 9 * * 1,2,3,4,5 /Users/me/.scripts/my-daily-standup.sh

Voila. With any luck, the script my-daily-standup.sh will get triggered every day form Monday to Friday at 9:28AM your local time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment